inode_for_each_dentry(other_dentry, dentry->d_inode) {
if (dentry_has_short_name(other_dentry)
&& !other_dentry->skeleton_extracted
- && other_dentry->in_extraction_tree)
+ && other_dentry->in_extraction_tree
+ && !other_dentry->extraction_skipped)
{
DEBUG("Creating %"TS" before %"TS" "
"to guarantee correct DOS name extraction",
/* Extract stream to temporary file. */
ret = create_temporary_file(&tmpfile_fd, &tmpfile_name);
- if (ret)
+ if (ret) {
+ lte_unbind_wim_resource_spec(needed_lte);
goto out_free_found_lte;
+ }
ret = extract_full_stream_to_fd(needed_lte,
&tmpfile_fd);
* directory tree. (If not, extract_dentry_to_stdout() will
* return an error.) */
if (extract_flags & WIMLIB_EXTRACT_FLAG_TO_STDOUT) {
- ret = extract_dentry_to_stdout(ctx.extract_root);
+ ret = 0;
+ for (size_t i = 0; i < num_trees; i++) {
+ ret = extract_dentry_to_stdout(trees[i]);
+ if (ret)
+ break;
+ }
goto out_teardown_stream_list;
}
~WIMLIB_EXTRACT_FLAG_GLOB_PATHS)
| WIMLIB_EXTRACT_FLAG_PATHMODE),
progress_func);
+
+ if (extract_flags & (WIMLIB_EXTRACT_FLAG_SYMLINK |
+ WIMLIB_EXTRACT_FLAG_HARDLINK))
+ {
+ for_lookup_table_entry(wim->lookup_table,
+ lte_free_extracted_file,
+ NULL);
+ }
out_free_trees:
FREE(trees);
return ret;