Commit: e96411aaad14c7178081ce65563de8cb1fc5f168
Author: Campbell Barton
Date:   Wed Oct 21 03:07:40 2015 +1100
Branches: master
https://developer.blender.org/rBe96411aaad14c7178081ce65563de8cb1fc5f168

Fix T46544: Can't unpack generated image

===================================================================

M       source/blender/blenkernel/intern/packedFile.c

===================================================================

diff --git a/source/blender/blenkernel/intern/packedFile.c 
b/source/blender/blenkernel/intern/packedFile.c
index 151889b..a1669c7 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 {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to