Fix null check

This commit is contained in:
Jack251970 2025-06-07 14:02:32 +08:00
parent ab1fe67dd4
commit fdb0cf508a

View file

@ -360,18 +360,20 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
private void AddIndexSearchExcludePaths()
{
var container = Settings.IndexSearchExcludedSubdirectoryPaths;
if (container is null) return;
var folderBrowserDialog = new FolderBrowserDialog();
if (folderBrowserDialog.ShowDialog() != DialogResult.OK)
return;
var newAccessLink = new AccessLink
{
Name = folderBrowserDialog.SelectedPath.GetPathName(),
Path = folderBrowserDialog.SelectedPath
};
container.Add(newAccessLink);
Save();
}