X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Funix_apply.c;h=7ed142256806af0b41d68bd48abe076c032686b0;hb=3df040b57bf40f45a636fa4a012ba1eeb6157e92;hp=b41c1e2c0ff0d0ffb966317829157ef00688de3f;hpb=c1d980511c9b9e53dec66710904ad8f98bc22809;p=wimlib diff --git a/src/unix_apply.c b/src/unix_apply.c index b41c1e2c..7ed14225 100644 --- a/src/unix_apply.c +++ b/src/unix_apply.c @@ -372,7 +372,8 @@ unix_create_if_directory(const struct wim_dentry *dentry, ERROR_WITH_ERRNO("Can't create directory \"%s\"", path); return WIMLIB_ERR_MKDIR; } - return 0; + + return report_file_created(&ctx->common); } /* If @dentry represents an empty regular file or a special file, create it, set @@ -444,7 +445,11 @@ unix_extract_if_empty_file(const struct wim_dentry *dentry, if (ret) return ret; - return unix_create_hardlinks(inode, dentry, path, ctx); + ret = unix_create_hardlinks(inode, dentry, path, ctx); + if (ret) + return ret; + + return report_file_created(&ctx->common); } static int @@ -561,8 +566,7 @@ retry_create: /* Called when starting to read a single-instance stream for extraction */ static int -unix_begin_extract_stream(struct wim_lookup_table_entry *stream, - u32 flags, void *_ctx) +unix_begin_extract_stream(struct wim_lookup_table_entry *stream, void *_ctx) { struct unix_apply_ctx *ctx = _ctx; const struct stream_owner *owners = stream_owners(stream); @@ -681,6 +685,9 @@ unix_set_dir_metadata(struct list_head *dentry_list, struct unix_apply_ctx *ctx) ret = unix_set_metadata(-1, dentry->d_inode, NULL, ctx); if (ret) return ret; + ret = report_file_metadata_applied(&ctx->common); + if (ret) + return ret; } } return 0; @@ -713,6 +720,7 @@ unix_extract(struct list_head *dentry_list, struct apply_ctx *_ctx) * because we can't extract any other files until their directories * exist. Empty files are needed because they don't have * representatives in the stream list. */ + reset_file_progress(&ctx->common); ret = unix_create_dirs_and_empty_files(dentry_list, ctx); if (ret) goto out; @@ -743,8 +751,10 @@ unix_extract(struct list_head *dentry_list, struct apply_ctx *_ctx) if (ret) goto out; + /* Set directory metadata. We do this last so that we get the right * directory timestamps. */ + reset_file_progress(&ctx->common); ret = unix_set_dir_metadata(dentry_list, ctx); if (ret) goto out;