lte = inode_unnamed_lte_resolved(inode);
if (lte) {
- maybe_add_stream_for_extraction(lte, stream_list);
+ if (!inode->i_visited)
+ maybe_add_stream_for_extraction(lte, stream_list);
list_add_tail(&dentry->tmp_list, <e->lte_dentry_list);
dentry_added = true;
}
if (inode->i_ads_entries[i].stream_name_nbytes != 0) {
lte = inode->i_ads_entries[i].lte;
if (lte) {
- maybe_add_stream_for_extraction(lte,
- stream_list);
+ if (!inode->i_visited) {
+ maybe_add_stream_for_extraction(lte,
+ stream_list);
+ }
if (!dentry_added) {
list_add_tail(&dentry->tmp_list,
<e->lte_dentry_list);
}
}
}
+ inode->i_visited = 1;
return 0;
}
dentry_reset_needs_extraction(struct wim_dentry *dentry, void *_ignore)
{
dentry->needs_extraction = 0;
+ dentry->d_inode->i_visited = 0;
return 0;
}
{
int ret;
struct wimlib_extract_command *cmds_copy;
- struct wim_lookup_table *wim_tab_save, *joined_tab;
int all_flags = 0;
default_extract_flags &= WIMLIB_EXTRACT_MASK_PUBLIC;
if (num_cmds == 0)
goto out;
- if (num_additional_swms) {
- ret = new_joined_lookup_table(wim, additional_swms,
- num_additional_swms,
- &joined_tab);
- if (ret)
- goto out;
- wim_tab_save = wim->lookup_table;
- wim->lookup_table = joined_tab;
- }
+ if (num_additional_swms)
+ merge_lookup_tables(wim, additional_swms, num_additional_swms);
cmds_copy = CALLOC(num_cmds, sizeof(cmds[0]));
if (!cmds_copy) {
}
FREE(cmds_copy);
out_restore_lookup_table:
- if (num_additional_swms) {
- free_lookup_table(wim->lookup_table);
- wim->lookup_table = wim_tab_save;
- }
+ if (num_additional_swms)
+ unmerge_lookup_table(wim);
out:
return ret;
}
unsigned num_additional_swms,
wimlib_progress_func_t progress_func)
{
- struct wim_lookup_table *joined_tab, *wim_tab_save;
int ret;
extract_flags &= WIMLIB_EXTRACT_MASK_PUBLIC;
if (ret)
return ret;
- if (num_additional_swms) {
- ret = new_joined_lookup_table(wim, additional_swms,
- num_additional_swms, &joined_tab);
- if (ret)
- return ret;
- wim_tab_save = wim->lookup_table;
- wim->lookup_table = joined_tab;
- }
+ if (num_additional_swms)
+ merge_lookup_tables(wim, additional_swms, num_additional_swms);
if (image == WIMLIB_ALL_IMAGES) {
ret = extract_all_images(wim, target,
lte_free_extracted_file,
NULL);
}
- if (num_additional_swms) {
- free_lookup_table(wim->lookup_table);
- wim->lookup_table = wim_tab_save;
- }
+ if (num_additional_swms)
+ unmerge_lookup_table(wim);
return ret;
}