From: Eric Biggers Date: Thu, 26 Jun 2014 00:43:00 +0000 (-0500) Subject: win32_capture.c: Exclude files pending deletion X-Git-Tag: v1.7.1~78 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=db5f5eee38b76db7f19367d0f4225b36f001325a win32_capture.c: Exclude files pending deletion --- 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; }