Skip to content

Commit

Permalink
[win] updatesvc: fix move to backup for portable version
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplestStudio committed Sep 2, 2024
1 parent e75fe27 commit fa8c109
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions win-linux/extras/update-daemon/src/classes/csvcmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,12 +716,12 @@ void CSvcManager::startReplacingFiles(const tstring &packageType, const bool res
}

// Replace app path to Backup
#ifdef _WIN32_UNUSED
if (!NS_File::dirExists(tmpPath) && !NS_File::makePath(tmpPath)) {
#ifdef _WIN32
if (packageType == TEXT("portable") && !NS_File::dirExists(tmpPath) && !NS_File::makePath(tmpPath)) {
NS_Logger::WriteLog(_TR("Update cancelled. Can't create folder:") + _T(" ") + tmpPath, true);
return;
}
if (!NS_File::replaceFolder(appPath, tmpPath, false)) {
if (!NS_File::replaceFolder(appPath, tmpPath, packageType != TEXT("portable"))) {
#else
if (!NS_File::replaceFolder(appPath, tmpPath, true)) {
#endif
Expand Down

0 comments on commit fa8c109

Please sign in to comment.