diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/packedFile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index 151889b10a1..a1669c745e6 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -582,7 +582,7 @@ int unpackImage(ReportList *reports, Image *ima, int how) { int ret_value = RET_ERROR; - if (ima != NULL && ima->name[0]) { + if (ima != NULL) { while (ima->packedfiles.last) { char localname[FILE_MAX], absname[FILE_MAX]; char *newname; @@ -605,7 +605,9 @@ int unpackImage(ReportList *reports, Image *ima, int how) } /* keep the new name in the image for non-pack specific reasons */ - BLI_strncpy(ima->name, newname, sizeof(imapf->filepath)); + if (how != PF_REMOVE) { + BLI_strncpy(ima->name, newname, sizeof(imapf->filepath)); + } MEM_freeN(newname); } else { |