mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
set error from errno before calling close() in QFileSystemEngine::copyFile()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
05982d0b07
commit
06526cb868
1 changed files with 1 additions and 1 deletions
|
@ -397,8 +397,8 @@ bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSyst
|
||||||
|
|
||||||
const int targetfd = QT_CREAT(target.nativeFilePath().constData(), st.st_mode);
|
const int targetfd = QT_CREAT(target.nativeFilePath().constData(), st.st_mode);
|
||||||
if (targetfd == -1) {
|
if (targetfd == -1) {
|
||||||
::close(sourcefd);
|
|
||||||
error = QSystemError(errno, QSystemError::StandardLibraryError);
|
error = QSystemError(errno, QSystemError::StandardLibraryError);
|
||||||
|
::close(sourcefd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue