Fix FileSel globbing including dirs & ".."
This commit is contained in:
@@ -637,7 +637,8 @@ int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matche
|
||||
*/
|
||||
for (i = 0; i < n; i++) {
|
||||
file = filelist_file(sfile->files, i);
|
||||
if (fnmatch(pattern, file->relname, 0) == 0) {
|
||||
/* use same rule as 'FileCheckType.CHECK_FILES' */
|
||||
if (S_ISREG(file->type) && (fnmatch(pattern, file->relname, 0) == 0)) {
|
||||
file->selflag |= FILE_SEL_SELECTED;
|
||||
if (!match) {
|
||||
BLI_strncpy(matched_file, file->relname, FILE_MAX);
|
||||
|
||||
Reference in New Issue
Block a user