diff --git a/Mapping_Tools/Views/HitsoundStudio/HitsoundStudioView.xaml.cs b/Mapping_Tools/Views/HitsoundStudio/HitsoundStudioView.xaml.cs index 59e5b352..4f868e69 100644 --- a/Mapping_Tools/Views/HitsoundStudio/HitsoundStudioView.xaml.cs +++ b/Mapping_Tools/Views/HitsoundStudio/HitsoundStudioView.xaml.cs @@ -266,6 +266,24 @@ private async void Start_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Please select a base beatmap first."); return; } + + if (!Directory.Exists(settings.ExportFolder)) + { + var folderResult = MessageBox.Show( + $"Folder at path \"{settings.ExportFolder}\" does not exist.\nCreate a new folder?", + "Export path not found.", MessageBoxButton.YesNo, MessageBoxImage.Warning); + + if (folderResult == MessageBoxResult.Yes) { + try { + Directory.CreateDirectory(settings.ExportFolder); + } catch (Exception ex) { + ex.Show(); + return; + } + } else { + return; + } + } // Remove logical focus to trigger LostFocus on any fields that didn't yet update the ViewModel FocusManager.SetFocusedElement(FocusManager.GetFocusScope(this), null);