VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/libzip/zip_source_win32handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/libzip/zip_source_win32handle.c')
-rw-r--r--src/Common/libzip/zip_source_win32handle.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Common/libzip/zip_source_win32handle.c b/src/Common/libzip/zip_source_win32handle.c
index 35e2e679..7fe003dc 100644
--- a/src/Common/libzip/zip_source_win32handle.c
+++ b/src/Common/libzip/zip_source_win32handle.c
@@ -344,9 +344,12 @@ _win32_read_file(void *state, void *data, zip_uint64_t len, zip_source_cmd_t cmd
}
else {
h = ctx->ops->op_open(ctx);
- if (h == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_NOT_FOUND) {
- zip_error_set(&ctx->error, ZIP_ER_READ, ENOENT);
- return -1;
+ if (h == INVALID_HANDLE_VALUE) {
+ win32err = GetLastError();
+ if (win32err == ERROR_FILE_NOT_FOUND || win32err == ERROR_PATH_NOT_FOUND) {
+ zip_error_set(&ctx->error, ZIP_ER_READ, ENOENT);
+ return -1;
+ }
}
}