From e16fc3e19c3fbef1e22099b40a92dafd832ff05c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 9 Jun 2023 13:46:11 +0200 Subject: [PATCH] w32: Map ERROR_FILE_INVALID to EIO. * common/sysutils.c (map_w32_to_errno): Add mapping. -- We see this error sometimes when writing to an USB connected disk. --- common/sysutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/sysutils.c b/common/sysutils.c index ff75b698e..b59d2a961 100644 --- a/common/sysutils.c +++ b/common/sysutils.c @@ -252,6 +252,9 @@ map_w32_to_errno (DWORD w32_err) case ERROR_ALREADY_EXISTS: return EEXIST; + case ERROR_FILE_INVALID: + return EIO; + /* This mapping has been taken from reactOS. */ case ERROR_TOO_MANY_OPEN_FILES: return EMFILE; case ERROR_ARENA_TRASHED: return ENOMEM;