diff options
Diffstat (limited to 'source/blender/imbuf/intern/indexer.c')
-rw-r--r-- | source/blender/imbuf/intern/indexer.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index 97a0cc85301..46095b7eedc 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -366,7 +366,7 @@ void IMB_anim_get_fname(struct anim *anim, char *file, int size) BLI_strncpy(file, fname, size); } -static void get_proxy_filename(struct anim *anim, +static bool get_proxy_filename(struct anim *anim, IMB_Proxy_Size preview_size, char *fname, bool temp) @@ -393,7 +393,12 @@ static void get_proxy_filename(struct anim *anim, get_index_dir(anim, index_dir, sizeof(index_dir)); + if (BLI_path_ncmp(anim->name, index_dir, FILE_MAXDIR) == 0) { + return false; + } + BLI_join_dirfile(fname, FILE_MAXFILE + FILE_MAXDIR, index_dir, proxy_name); + return true; } static void get_tc_filename(struct anim *anim, IMB_Timecode_Type tc, char *fname) @@ -1154,8 +1159,9 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Proxy_Size proxy_size = proxy_sizes[i]; if (proxy_size & proxy_sizes_to_build) { char filename[FILE_MAX]; - get_proxy_filename(anim, proxy_size, filename, false); - + if (get_proxy_filename(anim, proxy_size, filename, false) == false) { + return NULL; + } void **filename_key_p; if (!BLI_gset_ensure_p_ex(file_list, filename, &filename_key_p)) { *filename_key_p = BLI_strdup(filename); @@ -1176,7 +1182,9 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Proxy_Size proxy_size = proxy_sizes[i]; if (proxy_size & built_proxies) { char filename[FILE_MAX]; - get_proxy_filename(anim, proxy_size, filename, false); + if (get_proxy_filename(anim, proxy_size, filename, false) == false) { + return NULL; + } printf("Skipping proxy: %s\n", filename); } } |