mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
Update file and folder handling methods from Radarr (#1051)
* Update file/folder handling methods from Radarr * fixup!
This commit is contained in:
@@ -90,6 +90,12 @@ namespace NzbDrone.Update.UpdateEngine
|
||||
|
||||
Verify(installationFolder, processId);
|
||||
|
||||
if (installationFolder.EndsWith(@"\bin\Prowlarr") || installationFolder.EndsWith(@"/bin/Prowlarr"))
|
||||
{
|
||||
installationFolder = installationFolder.GetParentPath();
|
||||
_logger.Info("Fixed Installation Folder: {0}", installationFolder);
|
||||
}
|
||||
|
||||
var appType = _detectApplicationType.GetAppType();
|
||||
|
||||
_processProvider.FindProcessByName(ProcessProvider.PROWLARR_CONSOLE_PROCESS_NAME);
|
||||
@@ -125,7 +131,7 @@ namespace NzbDrone.Update.UpdateEngine
|
||||
// Set executable flag on app
|
||||
if (OsInfo.IsOsx || (OsInfo.IsLinux && PlatformInfo.IsNetCore))
|
||||
{
|
||||
_diskProvider.SetPermissions(Path.Combine(installationFolder, "Prowlarr"), "0755");
|
||||
_diskProvider.SetPermissions(Path.Combine(installationFolder, "Prowlarr"), "0755", null);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -146,7 +152,7 @@ namespace NzbDrone.Update.UpdateEngine
|
||||
_terminateNzbDrone.Terminate(processId);
|
||||
|
||||
_logger.Info("Waiting for external auto-restart.");
|
||||
for (int i = 0; i < 5; i++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
System.Threading.Thread.Sleep(1000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user