Show folder names immediately and refresh stale index sizes without walking the whole drive.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
25
src/Explorer.App/Settings/SettingsPathBrowse.cs
Normal file
25
src/Explorer.App/Settings/SettingsPathBrowse.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Windows;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace Explorer.App.Settings;
|
||||
|
||||
internal static class SettingsPathBrowse
|
||||
{
|
||||
public static bool TryPick(Window? owner, string title, string filter, string? current, out string path)
|
||||
{
|
||||
var dlg = new OpenFileDialog
|
||||
{
|
||||
Title = title,
|
||||
Filter = filter,
|
||||
FileName = current ?? ""
|
||||
};
|
||||
if (dlg.ShowDialog(owner) == true)
|
||||
{
|
||||
path = dlg.FileName;
|
||||
return true;
|
||||
}
|
||||
|
||||
path = "";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user