1
0
mirror of https://github.com/InfrastructureServices/vsftpd.git synced 2025-04-19 01:24:02 +03:00

Fix question mark wildcard withing a file name.

Previously '?' worked only at the end of a file name, now it can
be used anywhere.
This commit is contained in:
Martin Sehnoutka 2016-11-17 13:25:12 +01:00
parent 03ff061f18
commit 0da42468ac

3
ls.c
View File

@ -459,7 +459,8 @@ vsf_filename_passes_filter(const struct mystr* p_filename_str,
must_match_at_current_pos = 0;
}
} while (locate_result.found &&
str_getlen(&name_remain_str) > 0 && last_token != '*');
str_getlen(&name_remain_str) > 0 &&
last_token != '*' && last_token != '?');
}
/* Any incoming string left means no match unless we ended on the correct
* type of wildcard.