mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
close the file descriptor even if lseek() fails in QFSFileEngine::open()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
267bbbfac5
commit
909aad3c9f
1 changed files with 2 additions and 1 deletions
|
@ -193,6 +193,8 @@ bool QFSFileEngine::open(QIODevice::OpenMode openMode)
|
|||
return false;
|
||||
}
|
||||
|
||||
d->closeFileHandle = true;
|
||||
|
||||
// Seek to the end when in Append mode.
|
||||
if (d->openMode & QFile::Append) {
|
||||
int ret;
|
||||
|
@ -207,7 +209,6 @@ bool QFSFileEngine::open(QIODevice::OpenMode openMode)
|
|||
}
|
||||
}
|
||||
|
||||
d->closeFileHandle = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue