memcpy(new->attached_buffer, old->attached_buffer,
wim_resource_size(old));
break;
+#ifdef WITH_NTFS_3G
case RESOURCE_IN_NTFS_VOLUME:
if (old->ntfs_loc) {
struct ntfs_location *loc;
loc->stream_name_utf16_num_chars * 2);
}
break;
+#endif
+ default:
+ break;
}
return new;
out_free:
}
#ifdef WITH_FUSE
-void lte_decrement_num_opened_fds(struct lookup_table_entry *lte,
- struct lookup_table *table)
+void lte_decrement_num_opened_fds(struct lookup_table_entry *lte)
{
wimlib_assert(lte);
wimlib_assert(lte->num_opened_fds);
goto out_free_cur_entry;
}
+ /* Ordinarily, no two streams should share the same SHA1 message
+ * digest. However, this constraint can be broken for metadata
+ * resources--- two identical images will have the same metadata
+ * resource, but their lookup table entries are not shared. */
duplicate_entry = __lookup_resource(table, cur_entry->hash);
- if (duplicate_entry) {
+ if (duplicate_entry
+ && !((duplicate_entry->resource_entry.flags & WIM_RESHDR_FLAG_METADATA)
+ && cur_entry->resource_entry.flags & WIM_RESHDR_FLAG_METADATA))
+ {
ERROR("The WIM lookup table contains two entries with the "
"same SHA1 message digest!");
ERROR("The first entry is:");