mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win] updatesvc: fix move to backup for portable version
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user