Browse Source

Update Program.cs

Update so program can handle path with spaces in it.
Update location of debugging output data to a spot where a user most likely has access to write.
master
kougyoku 2 months ago
parent
commit
16c9c8f9b4
  1. 8
      Program.cs

8
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();
}

Loading…
Cancel
Save