Fixed bug #13919, now checks for the final filename component.
This commit is contained in:
parent
399f935908
commit
1d07b5d0be
1 changed files with 1 additions and 1 deletions
|
@ -1134,7 +1134,7 @@ bool map_editor::verify_filename(const std::string& filename, bool show_error) c
|
|||
{
|
||||
static const std::string allowed_characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_/\\.";
|
||||
static const std::string prefix = "\\/";
|
||||
std::size_t start_pos = filename.find_first_of(prefix);
|
||||
std::size_t start_pos = filename.find_last_of(prefix);
|
||||
|
||||
if(filename.find_first_not_of(allowed_characters, start_pos) != std::string::npos) {
|
||||
if(show_error) {
|
||||
|
|
Loading…
Add table
Reference in a new issue