Fixed bug #13919, now checks for the final filename component.

This commit is contained in:
Bram Ridder 2005-07-31 13:01:56 +00:00
parent 399f935908
commit 1d07b5d0be

View file

@ -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) {