diff --git a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs index 98e465b50..f3f0ee32c 100644 --- a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs +++ b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs @@ -7,6 +7,7 @@ namespace Flow.Launcher.Plugin.SharedCommands { public static class FilesFolders { + private const string FileExplorerProgramName = "explorer"; public static void Copy(this string sourcePath, string targetPath) { // Get the subdirectories for the specified directory. @@ -114,7 +115,7 @@ namespace Flow.Launcher.Plugin.SharedCommands try { if (LocationExists(location)) - Process.Start(location); + Process.Start(FileExplorerProgramName, location); } catch (Exception e) { diff --git a/Plugins/Flow.Launcher.Plugin.Folder/Main.cs b/Plugins/Flow.Launcher.Plugin.Folder/Main.cs index 84a83b666..4283fe7f7 100644 --- a/Plugins/Flow.Launcher.Plugin.Folder/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Folder/Main.cs @@ -7,6 +7,7 @@ using System.Windows; using System.Windows.Controls; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Storage; +using Flow.Launcher.Plugin.SharedCommands; namespace Flow.Launcher.Plugin.Folder { @@ -18,8 +19,7 @@ namespace Flow.Launcher.Plugin.Folder public const string CopyImagePath = "Images\\copy.png"; private string DefaultFolderSubtitleString = "Ctrl + Enter to open the directory"; - - private const string _fileExplorerProgramName = "explorer"; + private static List _driverNames; private PluginInitContext _context; @@ -103,7 +103,7 @@ namespace Flow.Launcher.Plugin.Folder { try { - Process.Start(_fileExplorerProgramName, path); + FilesFolders.OpenLocationInExporer(path); return true; } catch (Exception ex) @@ -255,7 +255,7 @@ namespace Flow.Launcher.Plugin.Folder { try { - Process.Start(_fileExplorerProgramName, filePath); + FilesFolders.OpenLocationInExporer(filePath); } catch (Exception ex) { @@ -286,7 +286,7 @@ namespace Flow.Launcher.Plugin.Folder Score = 500, Action = c => { - Process.Start(_fileExplorerProgramName, search); + FilesFolders.OpenLocationInExporer(search); return true; } };