[Bf-blender-cvs] [070f516] master: Fix FileSel globbing including dirs & ".."
Campbell Barton
noreply at git.blender.org
Tue Feb 17 02:03:15 CET 2015
Commit: 070f516b522e0f64c681e488348dad1f5f4ea83e
Author: Campbell Barton
Date: Tue Feb 17 12:01:47 2015 +1100
Branches: master
https://developer.blender.org/rB070f516b522e0f64c681e488348dad1f5f4ea83e
Fix FileSel globbing including dirs & ".."
===================================================================
M source/blender/editors/space_file/filesel.c
===================================================================
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 3b48af7..761249e 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);
More information about the Bf-blender-cvs
mailing list