core: improve updater to detect errors. resolves #8631 (#8661)

This commit is contained in:
Diego Heras
2020-05-16 01:43:42 +02:00
committed by GitHub
parent e00861b9ec
commit af9224ccbe
4 changed files with 41 additions and 17 deletions

View File

@@ -424,6 +424,11 @@ namespace Jackett.Updater
}
}
// remove .lock file to detect errors in the update process
var lockFilePath = Path.Combine(options.Path, ".lock");
if (File.Exists(lockFilePath))
File.Delete(lockFilePath);
// kill pids after the update on UNIX
if (!isWindows)
KillPids(pids);