Skip to content

Commit

Permalink
Catch DirectoryNotFoundException
Browse files Browse the repository at this point in the history
It is possible the entire target directory where the pid file lives may not exist. In that instance a DirectoryNotFoundException will be thrown instead of FileNotFoundException.
  • Loading branch information
Damon3000s committed Jan 27, 2025
1 parent d27d349 commit 6bd906d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SingleAppInstance/SingleAppInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ internal static bool IsAlreadyRunning()
return true;
}
}
catch (DirectoryNotFoundException)
{
}
catch (FileNotFoundException)
{
}
Expand Down

0 comments on commit 6bd906d

Please sign in to comment.