forked from qt-creator/qt-creator
Fix issues with saving files on network drives on Windows
In these cases the user might not have sufficient rights for ReplaceFile to merge all file attributes and ACLs. Make ReplaceFile ignore these errors. Task-number: QTCREATORBUG-20560 Change-Id: I6980d8af66cb7200c39726f0e7273df83c99bf5c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -126,7 +126,7 @@ bool SaveFile::commit()
|
||||
m_tempFile.reset();
|
||||
bool result = ReplaceFile(finalFileName.toStdWString().data(),
|
||||
fileName().toStdWString().data(),
|
||||
nullptr, 0, nullptr, nullptr);
|
||||
nullptr, REPLACEFILE_IGNORE_MERGE_ERRORS, nullptr, nullptr);
|
||||
if (!result) {
|
||||
const DWORD replaceErrorCode = GetLastError();
|
||||
QString errorStr;
|
||||
|
||||
Reference in New Issue
Block a user