QSaveFile[win]: remove fallback to old renameOverwrite
Our new way of doing it is atomic, so while conflicts can still happen that leads to e.g. access denied, those will be because the _target file_ is already accessed for some reason. The fallback might be lucky enough that it happens after this other access is done, but probably not. So remove the fallback and just do the atomic rename. Change-Id: I13f6b4b70974500b8dd9309138b9052b6a5acc62 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
5cf94bcc2f
commit
d807a9ebb1
|
|
@ -393,10 +393,9 @@ bool QTemporaryFileEngine::renameOverwrite(const QString &newName)
|
|||
}
|
||||
#ifdef Q_OS_WIN
|
||||
if (flags & Win32NonShared) {
|
||||
if (d_func()->nativeRenameOverwrite(newName)) {
|
||||
QFSFileEngine::close();
|
||||
return true;
|
||||
}
|
||||
bool ok = d_func()->nativeRenameOverwrite(newName);
|
||||
QFSFileEngine::close();
|
||||
return ok;
|
||||
}
|
||||
#endif
|
||||
QFSFileEngine::close();
|
||||
|
|
|
|||
Loading…
Reference in New Issue