back_ptr = retrieve_pointer_to_unhashed_blob(blob);
copy_hash(blob->hash, template_blob->hash);
- if (after_blob_hashed(blob, back_ptr, blob_table) != blob)
+ if (after_blob_hashed(blob, back_ptr, blob_table,
+ inode) != blob)
free_blob_descriptor(blob);
}
}
reference_template_file(struct wim_inode *inode, WIMStruct *wim,
WIMStruct *template_wim)
{
- struct wim_dentry *dentry = inode_first_dentry(inode);
+ struct wim_dentry *dentry = inode_any_dentry(inode);
struct wim_dentry *template_dentry;
int ret;
return WIMLIB_ERR_METADATA_NOT_FOUND;
new_imd = wim->image_metadata[new_image - 1];
- if (!new_imd->modified)
+ if (!is_image_dirty(new_imd))
return WIMLIB_ERR_INVALID_PARAM;
ret = select_wim_image(template_wim, template_image);