[BUG] Fix open folder directory that contains commas (#119)

This commit is contained in:
Markus Hofknecht 2020-07-16 12:42:00 +02:00
parent b8a305e257
commit bcc16a9dfd
4 changed files with 10 additions and 5 deletions

View file

@ -591,7 +591,7 @@ namespace SystemTrayMenu.Business
private static void OpenFolder()
{
Log.ProcessStart("explorer.exe", Config.Path);
Log.ProcessStart("explorer.exe", Config.Path, true);
}
private Menu Create(MenuData menuData, string title = null)

View file

@ -231,7 +231,7 @@ namespace SystemTrayMenu.DataClasses
if (ContainsMenu &&
(e == null || e.Button == MouseButtons.Left))
{
Log.ProcessStart("explorer.exe", TargetFilePath);
Log.ProcessStart("explorer.exe", TargetFilePath, true);
}
}

View file

@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.9.2")]
[assembly: AssemblyFileVersion("1.0.9.2")]
[assembly: AssemblyVersion("1.0.9.3")]
[assembly: AssemblyFileVersion("1.0.9.3")]

View file

@ -63,8 +63,13 @@ namespace SystemTrayMenu.Utilities
Logger.ShutDown();
}
internal static void ProcessStart(string fileName, string arguments = null)
internal static void ProcessStart(string fileName, string arguments = null, bool doubleQuoteArg = false)
{
if (doubleQuoteArg && arguments != null)
{
arguments = "\"" + arguments + "\"";
}
try
{
using Process p = new Process