소스 검색

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;