forked from qt-creator/qt-creator
CMakePM: Do not issue error message when CMakeCache.txt is missing
Only do the backup of the CMakeCache.txt and the file-api json reply directory when they exist. Change-Id: I0fe1098968c5b6b3a8285745452d5a24d7ded638 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -321,9 +321,10 @@ void FileApiReader::makeBackupConfiguration(bool store)
|
||||
if (!store)
|
||||
std::swap(cmakeCacheTxt, cmakeCacheTxtPrev);
|
||||
|
||||
if (!FileUtils::copyIfDifferent(cmakeCacheTxt, cmakeCacheTxtPrev))
|
||||
Core::MessageManager::writeFlashing(tr("Failed to copy %1 to %2.")
|
||||
.arg(cmakeCacheTxt.toString(), cmakeCacheTxtPrev.toString()));
|
||||
if (cmakeCacheTxt.exists())
|
||||
if (!FileUtils::copyIfDifferent(cmakeCacheTxt, cmakeCacheTxtPrev))
|
||||
Core::MessageManager::writeFlashing(tr("Failed to copy %1 to %2.")
|
||||
.arg(cmakeCacheTxt.toString(), cmakeCacheTxtPrev.toString()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user