From db5f5eee38b76db7f19367d0f4225b36f001325a Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 25 Jun 2014 19:43:00 -0500 Subject: [PATCH 1/1] win32_capture.c: Exclude files pending deletion --- src/win32_capture.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/win32_capture.c b/src/win32_capture.c index 6223ed26..4bccfa14 100644 --- a/src/win32_capture.c +++ b/src/win32_capture.c @@ -1110,11 +1110,19 @@ winnt_build_dentry_tree_recursive(struct wim_dentry **root_ret, SYNCHRONIZE, &h); if (unlikely(!NT_SUCCESS(status))) { - set_errno_from_nt_status(status); - ERROR_WITH_ERRNO("\"%ls\": Can't open file " - "(status=0x%08"PRIx32")", - printable_path(full_path), (u32)status); - ret = WIMLIB_ERR_OPEN; + if (status == STATUS_DELETE_PENDING) { + WARNING("\"%ls\": Deletion pending; skipping file", + printable_path(full_path)); + ret = 0; + } else { + set_errno_from_nt_status(status); + ERROR_WITH_ERRNO("\"%ls\": Can't open file " + "(status=0x%08"PRIx32")", + printable_path(full_path), (u32)status); + ret = WIMLIB_ERR_OPEN; + } + /* XXX: Provide option to exclude files that fail with + * STATUS_SHARING_VIOLATION? */ goto out; } -- 2.43.0