Skip to content

Commit bbb6fd4

Browse files
authored
Fix incorrect path while upward to root disk (#860)
* Fix incorrect path while upward to root disk
1 parent 8ccfefe commit bbb6fd4

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Files/Views/InstanceTabsView.xaml.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -311,18 +311,14 @@ public static string NormalizePath(string path)
311311
}
312312
else
313313
{
314-
if (path.Contains('\\'))
314+
if (!path.EndsWith(Path.DirectorySeparatorChar))
315315
{
316-
return Path.GetFullPath(new Uri(path).LocalPath)
317-
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar)
318-
.ToUpperInvariant();
319-
}
320-
else
321-
{
322-
return Path.GetFullPath(path)
323-
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar)
324-
.ToUpperInvariant();
316+
path += Path.DirectorySeparatorChar;
325317
}
318+
319+
return Path.GetFullPath(new Uri(path).LocalPath)
320+
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar)
321+
.ToUpperInvariant();
326322
}
327323
}
328324

0 commit comments

Comments
 (0)