X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fexport_image.c;h=8ad2d533644f86c0ba73ad5f3fd8f4105cbf740a;hb=de58d5f57732df8129fbfd71d46ae5968ac59646;hp=8d73328458a6677e47a625da8ea620446727d838;hpb=3de1ec66f778edda19865482d685bc6f4e17faf7;p=wimlib diff --git a/src/export_image.c b/src/export_image.c index 8d733284..8ad2d533 100644 --- a/src/export_image.c +++ b/src/export_image.c @@ -59,13 +59,11 @@ inode_export_blobs(struct wim_inode *inode, struct blob_table *src_blob_table, const u8 *hash; struct blob_descriptor *src_blob, *dest_blob; - inode_unresolve_streams(inode); - for (i = 0; i < inode->i_num_streams; i++) { /* Retrieve SHA-1 message digest of blob to export. */ hash = stream_hash(&inode->i_streams[i]); - if (is_zero_hash(hash)) /* Empty blob? */ + if (is_zero_hash(hash)) /* Empty stream? */ continue; /* Search for the blob (via SHA-1 message digest) in the @@ -75,7 +73,8 @@ inode_export_blobs(struct wim_inode *inode, struct blob_table *src_blob_table, /* Blob not yet present in destination WIM. Search for * it in the source WIM, then export it into the * destination WIM. */ - src_blob = lookup_blob(src_blob_table, hash); + src_blob = stream_blob(&inode->i_streams[i], + src_blob_table); if (!src_blob) return blob_not_found_error(inode, hash); @@ -129,7 +128,7 @@ wimlib_export_image(WIMStruct *src_wim, WIMLIB_EXPORT_FLAG_WIMBOOT)) return WIMLIB_ERR_INVALID_PARAM; - if (src_wim == NULL || dest_wim == NULL) + if (!src_wim || !dest_wim || src_wim == dest_wim) return WIMLIB_ERR_INVALID_PARAM; if (!wim_has_metadata(src_wim) || !wim_has_metadata(dest_wim))