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.
2 parents 741ddfe + 980795b commit e0d2af2Copy full SHA for e0d2af2
Flow.Launcher.Infrastructure/FileExplorerHelper.cs
@@ -15,7 +15,20 @@ public static string GetActiveExplorerPath()
15
{
16
var explorerWindow = GetActiveExplorer();
17
string locationUrl = explorerWindow?.LocationURL;
18
- return !string.IsNullOrEmpty(locationUrl) ? new Uri(locationUrl).LocalPath + "\\" : null;
+ return !string.IsNullOrEmpty(locationUrl) ? GetDirectoryPath(new Uri(locationUrl).LocalPath) : null;
19
+ }
20
+
21
+ /// <summary>
22
+ /// Get directory path from a file path
23
+ /// </summary>
24
+ private static string GetDirectoryPath(string path)
25
+ {
26
+ if (!path.EndsWith("\\"))
27
28
+ return path + "\\";
29
30
31
+ return path;
32
}
33
34
/// <summary>
0 commit comments