From ca7aa016b82ada3bbed49625077e785a02e3a292 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 14 Dec 2013 11:48:09 +0100 Subject: [PATCH] Hides the Windows error 19/ERROR_WRITE_PROTECT and convert it to errno EACCESS. --- mingw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mingw.c b/mingw.c index 71f3d51b..897ea6ff 100644 --- a/mingw.c +++ b/mingw.c @@ -570,6 +570,7 @@ static void windows_errno(DWORD error) case ERROR_ACCESS_DENIED : /* in CreateDirectoryW() if dir is scheduled for deletion */ case ERROR_CURRENT_DIRECTORY : /* in RemoveDirectoryW() if removing the current directory */ case ERROR_SHARING_VIOLATION : /* in RemoveDirectoryW() if in use */ + case ERROR_WRITE_PROTECT : /* when dealing with read-only media/snapshot and trying to write to them */ errno = EACCES; break; case ERROR_ALREADY_EXISTS : /* in CreateDirectoryW() if already exists */