diff options
author | George Hazan <ghazan@miranda.im> | 2020-08-27 22:35:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-08-27 22:35:21 +0300 |
commit | 0b7160fb2ae9797b78050479544cdd55f06cdf43 (patch) | |
tree | 29bfacbf474334a190bebbeb87608e9e86efa685 /plugins | |
parent | 8817ad073e29e600020280754c689b2452dbf4fb (diff) |
Plugin Updater: if a file doesn't exist, it shoudn't generate an error too
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/PluginUpdater/pu_stub/src/pu_stub.cpp | 1 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/plugins/PluginUpdater/pu_stub/src/pu_stub.cpp b/plugins/PluginUpdater/pu_stub/src/pu_stub.cpp index f93a07484d..60c67f7c1a 100644 --- a/plugins/PluginUpdater/pu_stub/src/pu_stub.cpp +++ b/plugins/PluginUpdater/pu_stub/src/pu_stub.cpp @@ -95,6 +95,7 @@ int APIENTRY wWinMain(HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR lpCmdLine, int) if (!MoveFileW(ptszFile1, ptszFile2)) { // use copy on error switch (DWORD err = GetLastError()) { case ERROR_ALREADY_EXISTS: + case ERROR_FILE_NOT_FOUND: dwError = 0; break; // this file was included into many archives, so Miranda tries to move it again & again diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 33acef4b87..dcb7fcb2c0 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -490,6 +490,7 @@ int SafeMoveFile(const wchar_t *pSrc, const wchar_t *pDst) if (!MoveFileW(pSrc, pDst)) { // use copy on error
switch (DWORD dwError = GetLastError()) {
case ERROR_ALREADY_EXISTS:
+ case ERROR_FILE_NOT_FOUND:
return 0; // this file was included into many archives, so Miranda tries to move it again & again
case ERROR_ACCESS_DENIED:
|