From 4c3ea14efc1f5d4a0c79c07f420b0854527ac21a Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Mon, 20 Jan 2025 02:09:14 +1000 Subject: [PATCH] Allow empty string (for "recent") in `MainForm.SanitiseForFileDialog` fixes 1cee9dff6 --- src/BizHawk.Client.EmuHawk/MainForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index db9eebe215..f035b54c11 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -4494,7 +4494,7 @@ namespace BizHawk.Client.EmuHawk private static string SanitiseForFileDialog(string initDir) { - if (Directory.Exists(initDir)) return initDir; + if (initDir.Length is 0 || Directory.Exists(initDir)) return initDir; #if DEBUG throw new ArgumentException( paramName: nameof(initDir),