Fix FileSel globbing including dirs & ".."

This commit is contained in:
Campbell Barton
2015-02-17 12:01:47 +11:00
parent 8cb4011220
commit 070f516b52

View File

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