diff --git a/PromptPlayground/Views/MainView.axaml.cs b/PromptPlayground/Views/MainView.axaml.cs index 32cf7c8..dbee566 100644 --- a/PromptPlayground/Views/MainView.axaml.cs +++ b/PromptPlayground/Views/MainView.axaml.cs @@ -79,9 +79,16 @@ private void OnConfigClick(object sender, RoutedEventArgs e) { AllowMultiple = false }); + + if(folders == null || folders.Count == 0) + { + return null; + } + var folder = folders[0]?.TryGetLocalPath(); return folder; } + private async Task FileOpenAsync() { var file = await TopLevel.GetTopLevel(this)!.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions()