Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-02-17 04:01:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-17 04:01:47 +0300
commit070f516b522e0f64c681e488348dad1f5f4ea83e (patch)
tree86847cc177f939f767508613b101c21f85d17f82 /source/blender/editors/space_file/filesel.c
parent8cb4011220bffae553b7719556d5ee2f4e642b23 (diff)
Fix FileSel globbing including dirs & ".."
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 3b48af7f957..761249e7979 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -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);