diff --git a/Program.cs b/Program.cs index 1cf5e8c..0855f36 100644 --- a/Program.cs +++ b/Program.cs @@ -34,7 +34,11 @@ namespace LocalExplorer //Collect up the path //the replace function is here to trim out the arg as it //comes in from the url protocol handler - string path = args[0].Replace("localexplorer:", "").Replace("%5C", "\\"); ; + string path = args[0].Replace("localexplorer:", "").Replace("%5C", "\\"); + + //If there is a space in the path as it comes from the URL + //protocol handler, replace it with an actual space. + path = path.Replace("%20", " "); WriteOutputFile($"arg passed: {path}"); @@ -72,7 +76,7 @@ namespace LocalExplorer // comment this out to debug the program return; - StreamWriter outFile = new StreamWriter(@"C:\Windows\ISD\OUTPUT.txt", true); + StreamWriter outFile = new StreamWriter(@"C:\LocalExplorer\OUTPUT.txt", true); outFile.WriteLine(debugLine); outFile.Close(); }