Skip to content

Commit

Permalink
Don't replace the file extension if the selected file already has one.
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Jan 17, 2020
1 parent ed70e33 commit ae3a54d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libs/wxutil/FileChooser.cpp
Expand Up @@ -182,6 +182,7 @@ std::string FileChooser::getSelectedFileName()
if (!_open // save operation
&& !fileName.empty() // valid filename
&& !_defaultExt.empty() // non-empty default extension
&& os::getExtension(fileName).empty() // no extension selected by the user
&& !string::iends_with(fileName, _defaultExt)) // no default extension
{
fileName.append(_defaultExt);
Expand Down

0 comments on commit ae3a54d

Please sign in to comment.