Check wx dialogs aren't returning blank paths (#845)

This commit is contained in:
Colin Kinloch 2023-06-06 13:17:41 +01:00 committed by GitHub
parent 6073ab3ec6
commit ae4cb45cf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 9 deletions

View file

@ -375,7 +375,7 @@ void wxTitleManagerList::OnConvertToCompressedFormat(uint64 titleId)
// ask the user to provide a path for the output file
wxFileDialog saveFileDialog(this, _("Save Wii U game archive file"), defaultDir, wxHelper::FromUtf8(defaultFileName),
"WUA files (*.wua)|*.wua", wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (saveFileDialog.ShowModal() == wxID_CANCEL)
if (saveFileDialog.ShowModal() == wxID_CANCEL || saveFileDialog.GetPath().IsEmpty())
return;
fs::path outputPath(wxHelper::MakeFSPath(saveFileDialog.GetPath()));
fs::path outputPathTmp(wxHelper::MakeFSPath(saveFileDialog.GetPath().append("__tmp")));