From 3ba4c2551e2ee06f2df9784f097484f8621820f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Wed, 6 Dec 2017 08:48:00 +0100 Subject: Add translation for ERROR_INVALID_NAME Most functions return this if they're given an invalid path, eg. if they contain "<" or ">". ENOENT may seem like a strange translation, but that's what open(2) returns when fed garbage, so we'll roll with that. --- erts/emulator/nifs/win32/win_prim_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/erts/emulator/nifs/win32/win_prim_file.c b/erts/emulator/nifs/win32/win_prim_file.c index 9f993f1d24..9b79182f2c 100644 --- a/erts/emulator/nifs/win32/win_prim_file.c +++ b/erts/emulator/nifs/win32/win_prim_file.c @@ -1346,6 +1346,7 @@ static int windows_to_posix_errno(DWORD last_error) { case ERROR_PATH_NOT_FOUND: case ERROR_FILE_NOT_FOUND: case ERROR_NO_MORE_FILES: + case ERROR_INVALID_NAME: return ENOENT; case ERROR_TOO_MANY_OPEN_FILES: return EMFILE; -- cgit v1.2.3