mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
Merge pull request #1013 from ONLYOFFICE/fix/deleting_update_folder
Fix deleting update folder
This commit is contained in:
@ -441,6 +441,9 @@ void CSvcManager::clearTempFiles(const tstring &prefix, const tstring &except)
|
||||
NS_File::removeFile(filePath);
|
||||
}
|
||||
}
|
||||
tstring updPath = NS_File::parentPath(NS_File::appPath()) + UPDATE_PATH;
|
||||
if (except.empty() && NS_File::dirExists(updPath))
|
||||
NS_File::removeDirRecursively(updPath);
|
||||
});
|
||||
}
|
||||
|
||||
@ -592,15 +595,15 @@ void CSvcManager::startReplacingFiles(const tstring &packageType, const bool res
|
||||
}
|
||||
}
|
||||
|
||||
// Remove Backup dir
|
||||
NS_File::removeDirRecursively(tmpPath);
|
||||
|
||||
// Restart program
|
||||
if (restartAfterUpdate) {
|
||||
if (!NS_File::runProcess(appPath + APP_LAUNCH_NAME, _T("")))
|
||||
NS_Logger::WriteLog(_T("An error occurred while restarting the program!"), true);
|
||||
}
|
||||
|
||||
// Remove Backup dir
|
||||
NS_File::removeDirRecursively(tmpPath);
|
||||
|
||||
// Restart service
|
||||
#ifdef _WIN32
|
||||
restartService();
|
||||
|
||||
Reference in New Issue
Block a user