浏览代码

CIODevice: Update m_error if a write() fails.

Andreas Kling 6 年之前
父节点
当前提交
ae4ac524ad
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      LibCore/CIODevice.cpp

+ 1 - 0
LibCore/CIODevice.cpp

@@ -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;