X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwin32_capture.c;h=0f608a8ff7d675e5ba81a7f9677ad99df7b15c82;hp=88e31248621119b7a0e176329bfca6933c5afdc5;hb=6a9854db6d6ff8f5dd3f28a82946dd1ed673a36a;hpb=94fd0e32a64292c4e40b98fe542f4be78112e3c9 diff --git a/src/win32_capture.c b/src/win32_capture.c index 88e31248..0f608a8f 100644 --- a/src/win32_capture.c +++ b/src/win32_capture.c @@ -137,10 +137,16 @@ read_winnt_stream_prefix(const struct blob_descriptor *blob, u64 size, status = (*func_NtReadFile)(h, NULL, NULL, NULL, &iosb, buf, count, NULL, NULL); - if (!NT_SUCCESS(status)) { - winnt_error(status, L"\"%ls\": Error reading data", - printable_path(path)); - ret = WIMLIB_ERR_READ; + if (unlikely(!NT_SUCCESS(status))) { + if (status == STATUS_END_OF_FILE) { + ERROR("\"%ls\": File was concurrently truncated", + printable_path(path)); + ret = WIMLIB_ERR_CONCURRENT_MODIFICATION_DETECTED; + } else { + winnt_error(status, L"\"%ls\": Error reading data", + printable_path(path)); + ret = WIMLIB_ERR_READ; + } break; }