@@ -229,39 +229,38 @@ public void SavePluginSettings()
229229
230230 public void OpenDirectory ( string DirectoryPath , string FileNameOrFilePath = null )
231231 {
232- var customExplorerList = _settingsVM . Settings . CustomExplorerList ;
232+ // var customExplorerList = _settingsVM.Settings.CustomExplorerList;
233233 var explorerInfo = _settingsVM . Settings . CustomExplorer ;
234234
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
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 = explorerInfo.DirectoryArgument.Replace("%d", DirectoryPath)
246+ // });
247+ //}
248+ using var explorer = new Process ( ) ;
249+ explorerInfo . DirectoryArgument = "" ;
250+ explorerInfo . FileArgument = "" ;
251+ explorer . StartInfo = new ProcessStartInfo
249252 {
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- }
253+ FileName = explorerInfo . Path . Replace ( "%d" , DirectoryPath ) ,
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 ( ) ;
265264 }
266265
267266 private void OpenUri ( Uri uri , bool ? inPrivate = null )
0 commit comments