diff options
author | John Högberg <[email protected]> | 2017-12-06 08:48:00 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2017-12-06 12:46:19 +0100 |
commit | 3ba4c2551e2ee06f2df9784f097484f8621820f6 (patch) | |
tree | deb0074af829cf27c80d9098ee9956a06d6ed486 /erts/emulator | |
parent | ad484fc2003885e12b92ea49dcb1c71669761d62 (diff) | |
download | otp-3ba4c2551e2ee06f2df9784f097484f8621820f6.tar.gz otp-3ba4c2551e2ee06f2df9784f097484f8621820f6.tar.bz2 otp-3ba4c2551e2ee06f2df9784f097484f8621820f6.zip |
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.
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/nifs/win32/win_prim_file.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |