Explorar el Código

UI/updater: Always clean up temporary files

If an update failed to install, it would leave a single temporary file
behind for that particular patch / file.
Richard Stanway hace 4 años
padre
commit
c0d7602b64
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      UI/win-update/updater/updater.cpp

+ 2 - 0
UI/win-update/updater/updater.cpp

@@ -298,6 +298,8 @@ struct update_t {
 			} else {
 				DeleteFile(outputPath.c_str());
 			}
+			if (state == STATE_INSTALL_FAILED)
+				DeleteFile(tempPath.c_str());
 		} else if (state == STATE_DOWNLOADED) {
 			DeleteFile(tempPath.c_str());
 		}