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.
This commit is contained in:
parent
c0970aeb4e
commit
16c9c8f9b4
@ -34,7 +34,11 @@ namespace LocalExplorer
|
|||||||
//Collect up the path
|
//Collect up the path
|
||||||
//the replace function is here to trim out the arg as it
|
//the replace function is here to trim out the arg as it
|
||||||
//comes in from the url protocol handler
|
//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}");
|
WriteOutputFile($"arg passed: {path}");
|
||||||
|
|
||||||
@ -72,7 +76,7 @@ namespace LocalExplorer
|
|||||||
// comment this out to debug the program
|
// comment this out to debug the program
|
||||||
return;
|
return;
|
||||||
|
|
||||||
StreamWriter outFile = new StreamWriter(@"C:\Windows\ISD\OUTPUT.txt", true);
|
StreamWriter outFile = new StreamWriter(@"C:\LocalExplorer\OUTPUT.txt", true);
|
||||||
outFile.WriteLine(debugLine);
|
outFile.WriteLine(debugLine);
|
||||||
outFile.Close();
|
outFile.Close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user