|
25 | 25 | using System.Collections.Concurrent; |
26 | 26 | using System.Diagnostics; |
27 | 27 | using System.Collections.Specialized; |
28 | | -using Flow.Launcher.Infrastructure.UserSettings; |
29 | 28 |
|
30 | 29 | namespace Flow.Launcher |
31 | 30 | { |
@@ -229,39 +228,22 @@ public void SavePluginSettings() |
229 | 228 |
|
230 | 229 | public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null) |
231 | 230 | { |
232 | | - var customExplorerList = _settingsVM.Settings.CustomExplorerList; |
233 | 231 | var explorerInfo = _settingsVM.Settings.CustomExplorer; |
234 | 232 |
|
235 | | - var qttabbarIndex = customExplorerList.FindIndex(e => e.Name.Equals("QTTABBAR", StringComparison.OrdinalIgnoreCase)); |
236 | | - var isQttabbarSelected = qttabbarIndex == _settingsVM.Settings.CustomExplorerIndex; |
237 | | - |
238 | | - if (isQttabbarSelected) |
239 | | - { |
240 | | - Process.Start(new ProcessStartInfo |
241 | | - { |
242 | | - FileName = DirectoryPath, |
243 | | - UseShellExecute = true, |
244 | | - Verb = "open", |
245 | | - Arguments = FileNameOrFilePath |
246 | | - }); |
247 | | - } |
248 | | - else |
| 233 | + using var explorer = new Process(); |
| 234 | + explorer.StartInfo = new ProcessStartInfo |
249 | 235 | { |
250 | | - using var explorer = new Process(); |
251 | | - explorer.StartInfo = new ProcessStartInfo |
252 | | - { |
253 | | - FileName = explorerInfo.Path, |
254 | | - UseShellExecute = true, |
255 | | - Arguments = FileNameOrFilePath is null |
256 | | - ? explorerInfo.DirectoryArgument.Replace("%d", DirectoryPath) |
257 | | - : explorerInfo.FileArgument |
258 | | - .Replace("%d", DirectoryPath) |
259 | | - .Replace("%f", |
260 | | - Path.IsPathRooted(FileNameOrFilePath) ? FileNameOrFilePath : Path.Combine(DirectoryPath, FileNameOrFilePath) |
261 | | - ) |
262 | | - }; |
263 | | - explorer.Start(); |
264 | | - } |
| 236 | + FileName = explorerInfo.Path.Replace("%d", DirectoryPath), |
| 237 | + UseShellExecute = true, |
| 238 | + Arguments = FileNameOrFilePath is null |
| 239 | + ? explorerInfo.DirectoryArgument.Replace("%d", DirectoryPath) |
| 240 | + : explorerInfo.FileArgument |
| 241 | + .Replace("%d", DirectoryPath) |
| 242 | + .Replace("%f", |
| 243 | + Path.IsPathRooted(FileNameOrFilePath) ? FileNameOrFilePath : Path.Combine(DirectoryPath, FileNameOrFilePath) |
| 244 | + ) |
| 245 | + }; |
| 246 | + explorer.Start(); |
265 | 247 | } |
266 | 248 |
|
267 | 249 | private void OpenUri(Uri uri, bool? inPrivate = null) |
|
0 commit comments