From 7cd91a06ebc15729867c9bb2b56fb36f21ecb5e1 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Wed, 14 Jul 2021 13:45:19 +0200 Subject: Fix T88908: Incorrect path handling in adding strips When image strip is added from python using `image_strip_add` operator and directory path is not terminated with slash, last part of directory was ignored. Use `BLI_join_dirfile` instead of simple string concatenation. --- source/blender/editors/space_sequencer/sequencer_add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_sequencer') diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index ac31e0e7c37..1239286d4da 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -260,7 +260,7 @@ static void load_data_init_from_operator(SeqLoadData *load_data, bContext *C, wm RNA_PROP_BEGIN (op->ptr, itemptr, prop) { char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0); BLI_strncpy(load_data->name, filename, sizeof(load_data->name)); - BLI_snprintf(load_data->path, sizeof(load_data->path), "%s%s", directory, filename); + BLI_join_dirfile(load_data->path, sizeof(load_data->path), directory, filename); MEM_freeN(filename); break; } -- cgit v1.2.3