Skip to content

Commit 5bece84

Browse files
committed
Use Open dialog instead of Save to resolve interop error
1 parent e8954c7 commit 5bece84

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/Reloaded.Mod.Launcher.Lib/Commands/Application/AddApplicationCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,16 @@ private void UpdateIdIfDuplicate(IApplicationConfig config)
169169
/// </summary>
170170
private string SelectEXEFile()
171171
{
172-
var dialog = new VistaSaveFileDialog();
173-
dialog.OverwritePrompt = false;
172+
var dialog = new VistaOpenFileDialog();
174173
dialog.Title = Resources.AddAppExecutableTitle.Get();
175174
dialog.Filter = $"{Resources.AddAppExecutableFilter.Get()} (*.exe)|*.exe";
175+
dialog.CheckFileExists = true;
176+
dialog.Multiselect = false;
176177

177178
if ((bool)dialog.ShowDialog()!)
178179
return dialog.FileName;
179180

180-
return "";
181+
return string.Empty;
181182
}
182183
}
183184

0 commit comments

Comments
 (0)