From: Eric Biggers Date: Sun, 29 Dec 2013 02:44:21 +0000 (-0600) Subject: extract_trees(): Fix extraction of multiple paths to stdout X-Git-Tag: v1.6.0~56 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=da6d15f81e4ef37802d187dac187dfd6ceded6dd extract_trees(): Fix extraction of multiple paths to stdout --- diff --git a/src/extract.c b/src/extract.c index 44076db0..40838c4a 100644 --- a/src/extract.c +++ b/src/extract.c @@ -2374,7 +2374,12 @@ extract_trees(WIMStruct *wim, struct wim_dentry **trees, size_t num_trees, * 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; }