1
0
mirror of https://github.com/Sonarr/Sonarr synced 2025-10-05 23:52:45 +02:00

Attempt to remove pid file only if config folder exists

This commit is contained in:
Bogdan
2025-09-22 15:52:33 +03:00
committed by Mark McDowall
parent 5b135addaa
commit 8bab0a06dd

View File

@@ -222,7 +222,7 @@ namespace NzbDrone.Common.EnvironmentInfo
private void RemovePidFile()
{
if (OsInfo.IsNotWindows)
if (OsInfo.IsNotWindows && _diskProvider.FolderExists(_appFolderInfo.AppDataFolder))
{
_diskProvider.DeleteFile(Path.Combine(_appFolderInfo.AppDataFolder, "sonarr.pid"));
}