File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 11using System . IO ;
2+ using ShowWhatProcessLocksFile . LockFinding . Utils ;
23
34namespace ShowWhatProcessLocksFile . Utils ;
45
@@ -23,7 +24,7 @@ public static string GetFileFullName()
2324 throw new Exception ( $ "'{ args [ 1 ] } ' doesn't exist") ;
2425 }
2526
26- return args [ 1 ] ;
27+ return PathUtils . ToCanonicalPath ( args [ 1 ] ) ;
2728 }
2829
2930 private static bool Exists ( string path )
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ internal static class Elevation
99{
1010 public static void RestartAsAdmin ( string path )
1111 {
12+ // some of `\` signs can be interpreted as escape sequences.
13+ path = path . Replace ( "\\ " , "/" ) ;
14+
1215 new Process
1316 {
1417 StartInfo = new ProcessStartInfo ( Assembly . GetExecutingAssembly ( ) . Location , $ "\" { path } \" ")
You can’t perform that action at this time.
0 commit comments