Skip to content

Commit

Permalink
Always append .json for export state on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
black-sliver committed Jul 29, 2024
1 parent bb82304 commit e74ce8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/poptracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,10 @@ bool PopTracker::start()
std::string filename;
if (!Dlg::SaveFile("Save State", lastName.c_str(), {{"JSON Files",{"*.json"}}}, filename))
return;
#ifdef _WIN32 // windows does not add *.* filter, so we can be sure json was selected
if (filename.length() < 5 || strcasecmp(filename.c_str() + filename.length() - 5, ".JSON") != 0)
filename += ",json";
#endif
auto jWindow = windowToJson(_win);
json extra = {
{"at_uri", _atUri},
Expand Down

0 comments on commit e74ce8b

Please sign in to comment.