diff --git a/TVRename/Utility/Helper/Helpers.cs b/TVRename/Utility/Helper/Helpers.cs index 67da2d054..89f5ef7ab 100644 --- a/TVRename/Utility/Helper/Helpers.cs +++ b/TVRename/Utility/Helper/Helpers.cs @@ -14,6 +14,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.Contracts; +using System.IO; using System.Linq; using System.Reflection; using System.Windows.Forms; @@ -208,6 +209,8 @@ public static DateTime FromUnixTime(long unixTime) public static bool SysOpen(string what, string arguments = null) { + if (string.IsNullOrWhiteSpace(what)) return false; + try { Process.Start(what, arguments); @@ -218,6 +221,11 @@ public static bool SysOpen(string what, string arguments = null) Logger.Warn(e); return false; } + catch (FileNotFoundException e) + { + Logger.Warn(e); + return false; + } catch (Exception e) { Logger.Error(e);