diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-10 04:29:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-10 04:29:37 +0300 |
commit | ec9b836d3b5634ed06c0ae5e2461731bc43f34bf (patch) | |
tree | 8221fb8ca237af468a7ec8e356625642dcc7ff52 /source/blender/editors/space_file | |
parent | fbe81db29a28ee493655560c928cfa3ef9bd9d43 (diff) |
Fix T74579: Filename with '\' causes assert when browsing files
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 948fa91718e..52db0d1852d 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -636,7 +636,12 @@ static bool is_hidden_dot_filename(const char *filename, FileListInternEntry *fi BLI_strncpy(tmp_filename, filename, sizeof(tmp_filename)); sep = tmp_filename + (sep - filename); while (sep) { + /* This happens when a path contains 'ALTSEP', '\' on Unix for e.g. + * Supporting alternate slashes in paths is a bigger task involving changes + * in many parts of the code, for now just prevent an assert, see T74579. */ +#if 0 BLI_assert(sep[1] != '\0'); +#endif if (is_hidden_dot_filename(sep + 1, file)) { hidden = true; break; |