Skip to content

Commit

Permalink
Fix for #581
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSparkles committed Jan 20, 2019
1 parent 6f2a8e0 commit 0d5f84f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions TVRename/Utility/Helper/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 0d5f84f

Please sign in to comment.