Skip to content

Commit 7e6f504

Browse files
committed
verify change
1 parent 7ac22d0 commit 7e6f504

File tree

2 files changed

+31
-32
lines changed

2 files changed

+31
-32
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ public CustomExplorerViewModel CustomExplorer
135135
new()
136136
{
137137
Name = "QTTabBar",
138-
Path = "Explorer",
138+
Path = "\"%d\"",
139139
DirectoryArgument = "\"%d\"",
140140
FileArgument = "\"%f\"",
141-
Editable = false
141+
Editable = true
142142
}
143143
};
144144

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)