*/
/*
- * Copyright (C) 2012, 2013 Eric Biggers
+ * Copyright (C) 2012, 2013, 2014 Eric Biggers
*
* This file is part of wimlib, a library for working with WIM files.
*
dentry->extraction_list = (struct list_head){NULL, NULL};
}
-static void
-dentry_delete_from_list(struct wim_dentry *dentry)
+static int
+dentry_delete_from_list(struct wim_dentry *dentry, void *_ignore)
{
list_del(&dentry->extraction_list);
dentry_reset_extraction_list_node(dentry);
-}
-
-static int
-do_dentry_delete_from_list(struct wim_dentry *dentry, void *_ignore)
-{
- dentry_delete_from_list(dentry);
return 0;
}
if (!ctx->ops->supports_case_sensitive_filenames)
{
struct wim_dentry *other;
- list_for_each_entry(other, &dentry->case_insensitive_conflict_list,
- case_insensitive_conflict_list)
+ list_for_each_entry(other, &dentry->d_ci_conflict_list,
+ d_ci_conflict_list)
{
if (dentry_in_list(other)) {
if (ctx->extract_flags &
return 0;
skip_dentry:
- for_dentry_in_tree(dentry, do_dentry_delete_from_list, NULL);
+ for_dentry_in_tree(dentry, dentry_delete_from_list, NULL);
return 0;
}
struct list_head *prev, *cur;
/* Can't use list_for_each_entry() because a call to
- * dentry_calculate_extraction_name() may the current dentry and its
- * children from the list. */
+ * dentry_calculate_extraction_name() may delete the current dentry and
+ * its children from the list. */
prev = dentry_list;
for (;;) {
* volume. */
ret = ctx.ops->start_extract(target, &ctx);
if (ret)
- return ret;
+ goto out_destroy_dentry_list;
/* Get and check the features required to extract the dentries. */
dentry_list_get_features(&dentry_list, &required_features);
* can't be extracted due to naming problems. */
ret = dentry_list_calculate_extraction_names(&dentry_list, &ctx);
if (ret)
- goto out_destroy_dentry_list;
+ goto out_finish_or_abort_extract;
/* Build list of streams to extract. */
ret = dentry_list_resolve_streams(&dentry_list, &ctx);
if (ret)
- goto out_destroy_dentry_list;
+ goto out_finish_or_abort_extract;
INIT_LIST_HEAD(&ctx.stream_list);
ret = dentry_list_ref_streams(&dentry_list, &ctx);
if (ret)
out_destroy_stream_list:
if (!(ctx.extract_flags & WIMLIB_EXTRACT_FLAG_FILE_ORDER))
destroy_stream_list(&ctx.stream_list);
-out_destroy_dentry_list:
- destroy_dentry_list(&dentry_list);
out_finish_or_abort_extract:
if (ret) {
if (ctx.ops->abort_extract)
if (ctx.ops->finish_extract)
ret = ctx.ops->finish_extract(&ctx);
}
+out_destroy_dentry_list:
+ destroy_dentry_list(&dentry_list);
return ret;
}