diff options
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index f860f579930..ef95139abda 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -440,10 +440,8 @@ Image *BKE_add_image_imbuf(ImBuf *ibuf) { /* on save, type is changed to FILE in editsima.c */ Image *ima; - char filename[sizeof(ibuf->name)]; - BLI_split_dirfile(ibuf->name, NULL, filename); - ima= image_alloc(filename, IMA_SRC_FILE, IMA_TYPE_IMAGE); + ima= image_alloc(BLI_path_basename(ibuf->name), IMA_SRC_FILE, IMA_TYPE_IMAGE); if (ima) { BLI_strncpy(ima->name, ibuf->name, FILE_MAX); |