fix hatari exists

This commit is contained in:
2026-08-10 21:28:01 +02:00
parent ea66414496
commit d06ee381be
5 changed files with 5 additions and 7 deletions
+1 -3
View File
@@ -11,11 +11,9 @@ namespace MarcerGameDvdLauncher
if (string.IsNullOrWhiteSpace(exePath))
throw new ArgumentNullException(nameof(exePath));
// Defensive validation: ensure the executable exists and looks like an .exe
// Defensive validation: ensure the executable exists
if (!File.Exists(exePath))
throw new ArgumentException($"Hatari executable not found: {exePath}", nameof(exePath));
if (!string.Equals(Path.GetExtension(exePath), ".exe", StringComparison.OrdinalIgnoreCase))
throw new ArgumentException($"Hatari executable must be an .exe file: {exePath}", nameof(exePath));
_exePath = exePath;
_cfgPath = cfgPath;