Skip to content

Commit

Permalink
Fixed removing of autosaves when they contain spaces (for translations)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpersico-1988 authored and CelticMinstrel committed Mar 4, 2016
1 parent 626bf68 commit 5615fe3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/save_index.cpp
Expand Up @@ -168,8 +168,13 @@ std::vector<save_info> get_saves_list(const std::string* dir, const std::string*
filesystem::get_files_in_dir(creator.dir,&filenames);

if (filter) {

// Replace the spaces in the filter
std::string filter_replaced(filter->begin(), filter->end());
replace_space2underbar(filter_replaced);

filenames.erase(std::remove_if(filenames.begin(), filenames.end(),
filename_filter(*filter)),
filename_filter(filter_replaced)),
filenames.end());
}

Expand Down

0 comments on commit 5615fe3

Please sign in to comment.