WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE | \
WIMLIB_EXTRACT_FLAG_WIMBOOT)
+/* Send WIMLIB_PROGRESS_MSG_EXTRACT_FILE_STRUCTURE or
+ * WIMLIB_PROGRESS_MSG_EXTRACT_METADATA. */
+int
+do_file_extract_progress(struct apply_ctx *ctx, enum wimlib_progress_msg msg)
+{
+ ctx->count_until_file_progress = 512; /* Arbitrary value to limit calls */
+ return extract_progress(ctx, msg);
+}
+
/* Check whether the extraction of a dentry should be skipped completely. */
static bool
dentry_is_supported(struct wim_dentry *dentry,
}
ret = 0;
out:
- if (found_lte->resource_location != RESOURCE_IN_WIM)
+ if (found_lte && found_lte->resource_location != RESOURCE_IN_WIM)
FREE(rspec);
free_lookup_table_entry(found_lte);
return ret;
struct wim_lookup_table_entry *orig_lte = ctx->cur_stream;
const struct read_stream_list_callbacks *cbs = ctx->saved_cbs;
int ret;
+ const u32 orig_refcnt = orig_lte->out_refcnt;
BUILD_BUG_ON(MAX_OPEN_STREAMS < ARRAY_LEN(orig_lte->inline_stream_owners));
tmpfile_lte.resource_location = RESOURCE_IN_FILE_ON_DISK;
tmpfile_lte.file_on_disk = ctx->tmpfile_name;
ret = 0;
- for (u32 i = 0; i < orig_lte->out_refcnt; i++) {
+ for (u32 i = 0; i < orig_refcnt; i++) {
/* Note: it usually doesn't matter whether we pass the original
* stream entry to callbacks provided by the extraction backend