diff --git a/CHANGELIST.md b/CHANGELIST.md index 38f57e3f..9f4ff5cb 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -129,6 +129,7 @@ - Update to DIC 20220909 - Possibly fix PIC parsing - Add PS3 folder/file checks for detection +- Use default directory for folder browsing, if possible ### 2.3 (2022-02-05) - Start overhauling Redump information pulling, again diff --git a/MPF/ViewModels/MainViewModel.cs b/MPF/ViewModels/MainViewModel.cs index e41d50c5..db38897d 100644 --- a/MPF/ViewModels/MainViewModel.cs +++ b/MPF/ViewModels/MainViewModel.cs @@ -793,7 +793,15 @@ namespace MPF.UI.ViewModels /// private void BrowseFolder() { - WinForms.FolderBrowserDialog folderDialog = new WinForms.FolderBrowserDialog { ShowNewFolderButton = false, SelectedPath = System.AppDomain.CurrentDomain.BaseDirectory }; + string currentPath = App.Options.DefaultOutputPath; + if (string.IsNullOrWhiteSpace(currentPath) || !Directory.Exists(currentPath)) + currentPath = System.AppDomain.CurrentDomain.BaseDirectory; + + WinForms.FolderBrowserDialog folderDialog = new WinForms.FolderBrowserDialog + { + ShowNewFolderButton = false, + SelectedPath = currentPath, + }; WinForms.DialogResult result = folderDialog.ShowDialog(); if (result == WinForms.DialogResult.OK)