Skip to content

Commit

Permalink
#5289: Fix particle files getting generated with two dots in their fi…
Browse files Browse the repository at this point in the history
…lenames (..prt)
  • Loading branch information
codereader committed Sep 20, 2020
1 parent 8a444bd commit ae8b910
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/wxutil/FileChooser.cpp
Expand Up @@ -12,6 +12,7 @@
#include "dialog/MessageBox.h"
#include "string/predicate.h"
#include "string/case_conv.h"
#include "string/trim.h"
#include <wx/app.h>

namespace wxutil
Expand Down Expand Up @@ -63,8 +64,9 @@ void FileChooser::construct()
_title = _open ? _("Open File") : _("Save File");
}

// Make default extension lowercase
// Make default extension lowercase, and cut off any dots at the beginning
string::to_lower(_defaultExt);
string::trim_left(_defaultExt, ".");

if (!_open && _fileType == filetype::TYPE_MAP_EXPORT)
{
Expand Down

0 comments on commit ae8b910

Please sign in to comment.