mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Normalize slashes in path given to --file
Since we don't yet have a canonical way to normalize paths, here is yet another use of String.Replace (and this is how it happens).
This commit is contained in:
1 parent
25e2316345
commit
e3fd809d42
1 file changed
+4
-1
@@ -483,7 +483,10 @@ namespace Microsoft.PowerShell
|
||||
string exceptionMessage = null;
|
||||
try
|
||||
{
|
||||
file = Path.GetFullPath(args[i]);
|
||||
// Normalize slashes
|
||||
file = args[i].Replace(StringLiterals.AlternatePathSeparator,
|
||||
StringLiterals.DefaultPathSeparator);
|
||||
file = Path.GetFullPath(file);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user