Skip to content

Commit

Permalink
Cancel bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Dec 3, 2024
1 parent 01cc38a commit e385c21
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/PicView.Avalonia/FileSystem/FilePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,18 @@ public static async Task<string> SelectDirectory()
desktop.MainWindow?.StorageProvider is not { } provider)
throw new NullReferenceException("Missing StorageProvider instance.");

var options = new FolderPickerOpenOptions()
var options = new FolderPickerOpenOptions
{
Title = TranslationHelper.Translation.Folder + " - PicView",
AllowMultiple = false
};

var directory = await provider.OpenFolderPickerAsync(options);
if (directory.Count < 0)
if (directory is null)
{
return "";
}
if (directory.Count <= 0)
{
return "";
}
Expand Down

0 comments on commit e385c21

Please sign in to comment.