diff options
author | Stanislav Polukhanov <[email protected]> | 2025-07-07 18:22:56 +0300 |
---|---|---|
committer | Stanislav Polukhanov <[email protected]> | 2025-07-08 16:20:45 +0000 |
commit | df9df35a1b33ae64426ef8020a5b946a5dc0f9dd (patch) | |
tree | 73ff7d269cc2d3ea8aaacb0b8e083741cc0225e1 | |
parent | a43d909fa6f65712056e2dc840b94106bbbe52d6 (diff) |
Fixed physically destroying files of the project. Used Utils::FilePath
instead of QFile; added error text from Utils::FilePath::removeFile()
result to the error message.
Change-Id: I7668fa38f118bfe5f1aea150f6cc42bf1414a707
Reviewed-by: hjk <[email protected]>
-rw-r--r-- | src/plugins/coreplugin/fileutils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/coreplugin/fileutils.cpp b/src/plugins/coreplugin/fileutils.cpp index 829c338b00b..ea7a5d17381 100644 --- a/src/plugins/coreplugin/fileutils.cpp +++ b/src/plugins/coreplugin/fileutils.cpp @@ -161,12 +161,12 @@ void removeFiles(const FilePaths &filePaths, bool deleteFromFS) // remove from file system for (const FilePath &fp : filePaths) { - QFile file(fp.toUrlishString()); - if (!file.exists()) // could have been deleted by vc + if (!fp.exists()) // could have been deleted by vc continue; - if (!file.remove()) { + Result<> removeResult = fp.removeFile(); + if (!removeResult) { MessageManager::writeDisrupting( - Tr::tr("Failed to remove file \"%1\".").arg(fp.toUserOutput())); + Tr::tr("Failed to remove file \"%1\": %2").arg(fp.toUserOutput()).arg(removeResult.error())); } } } |