From 579631819f0136ab0fbb0f6c7c21265b468940dc Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 18 Jun 2018 12:26:47 +0200 Subject: 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. --- source/blender/makesdna/DNA_space_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_space_types.h') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 76ec6569b82..6879c3044a6 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -630,7 +630,7 @@ typedef struct FileSelectParams { char renamefile[256]; char renameedit[256]; /* annoying but the first is only used for initialization */ - char filter_glob[256]; /* list of filetypes to filter */ + char filter_glob[256]; /* FILE_MAXFILE */ /* list of filetypes to filter */ char filter_search[64]; /* text items' name must match to be shown. */ int filter_id; /* same as filter, but for ID types (aka library groups). */ -- cgit v1.2.3