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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-18 13:26:47 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-18 13:26:47 +0300
commit579631819f0136ab0fbb0f6c7c21265b468940dc (patch)
tree4c5ee6372525cb87827e0c09c7ffb03cc35b888a /source/blender/editors/space_file/filelist.c
parentb66ae8259e01526bb682c5081c4c0146416f8908 (diff)
Fix T55503: File browser filter not working correctly.
There were two issues here, introduced by rB66aa4af836: * Forgot to change length of some filter_glob var deep in filebrowser code. * Truncating filter_glob in general can be dangerous, generating unexpected patterns. Last point was the root of the issue here, truncating to 63 chars string left last group as 'match everything' `*` pattern. To fix that to some extent, added a new BLI_path_extension_glob_validate helper to BLI_path_util, which ensures we do not have last wildcards-only group in our pattern, when there are more than one group.
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r--source/blender/editors/space_file/filelist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 658725879cb..09e2660a762 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -267,10 +267,11 @@ typedef struct FileListEntryPreview {
ImBuf *img;
} FileListEntryPreview;
+
typedef struct FileListFilter {
unsigned int filter;
unsigned int filter_id;
- char filter_glob[256];
+ char filter_glob[FILE_MAXFILE];
char filter_search[66]; /* + 2 for heading/trailing implicit '*' wildcards. */
short flags;
} FileListFilter;
@@ -2464,7 +2465,7 @@ static void filelist_readjob_do(
BLI_Stack *todo_dirs;
TodoDir *td_dir;
char dir[FILE_MAX_LIBEXTRA];
- char filter_glob[64]; /* TODO should be define! */
+ char filter_glob[FILE_MAXFILE];
const char *root = filelist->filelist.root;
const int max_recursion = filelist->max_recursion;
int nbr_done_dirs = 0, nbr_todo_dirs = 1;