diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-07-14 14:45:19 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-07-14 14:56:09 +0300 |
commit | 7cd91a06ebc15729867c9bb2b56fb36f21ecb5e1 (patch) | |
tree | 5b68c9d021f77f9475e5c91a5ba72e5e3e8d8252 | |
parent | efe90944eee8d1563b1a035dc5f16821263b0ce6 (diff) |
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.
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_add.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |