We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8190817 commit a3e49e2Copy full SHA for a3e49e2
src/Files.App/Helpers/PathNormalization.cs
@@ -44,11 +44,15 @@ public static string NormalizePath(string path)
44
45
try
46
{
47
- return Path.GetFullPath(new Uri(path).LocalPath)
+ var pathUri = new Uri(path).LocalPath;
48
+ if (string.IsNullOrEmpty(pathUri))
49
+ return path;
50
+
51
+ return Path.GetFullPath(pathUri)
52
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar)
53
.ToUpperInvariant();
54
}
- catch (UriFormatException ex)
55
+ catch (Exception ex) when (ex is UriFormatException || ex is ArgumentException)
56
57
App.Logger.LogWarning(ex, path);
58
return path;
0 commit comments