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:
Andrew Schwartzmeyer committed 2016-07-01 14:36:15 -07:00
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)
{