mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
CIODevice: Update m_error if a write() fails.
This commit is contained in:
parent
c02b8b715d
commit
ae4ac524ad
Notes:
sideshowbarker
2024-07-19 13:46:10 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ae4ac524adc
1 changed files with 1 additions and 0 deletions
|
@ -208,6 +208,7 @@ bool CIODevice::write(const byte* data, int size)
|
|||
int rc = ::write(m_fd, data, size);
|
||||
if (rc < 0) {
|
||||
perror("CIODevice::write: write");
|
||||
set_error(errno);
|
||||
return false;
|
||||
}
|
||||
return rc == size;
|
||||
|
|
Loading…
Reference in a new issue