mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
CAtomicFile invariant: any method that closes the file must restore the original filename.
This commit is contained in:
@@ -61,7 +61,11 @@ namespace BlackMisc
|
||||
|
||||
void CAtomicFile::abandon()
|
||||
{
|
||||
if (! isOpen()) { return; }
|
||||
|
||||
QFile::close();
|
||||
remove();
|
||||
setFileName(m_originalFilename);
|
||||
}
|
||||
|
||||
CAtomicFile::FileError CAtomicFile::error() const
|
||||
|
||||
Reference in New Issue
Block a user