diff options
Diffstat (limited to 'src/w32.c')
| -rw-r--r-- | src/w32.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/w32.c b/src/w32.c index 0f69e652a57..f391f5e26eb 100644 --- a/src/w32.c +++ b/src/w32.c @@ -6519,7 +6519,15 @@ acl_get_file (const char *fname, acl_type_t type) if (!get_file_security (fname, si, psd, sd_len, &sd_len)) { xfree (psd); - errno = EIO; + err = GetLastError (); + if (err == ERROR_NOT_SUPPORTED) + errno = ENOTSUP; + else if (err == ERROR_FILE_NOT_FOUND + || err == ERROR_PATH_NOT_FOUND + || err == ERROR_INVALID_NAME) + errno = ENOENT; + else + errno = EIO; psd = NULL; } } @@ -6530,6 +6538,8 @@ acl_get_file (const char *fname, acl_type_t type) be encoded in the current ANSI codepage. */ || err == ERROR_INVALID_NAME) errno = ENOENT; + else if (err == ERROR_NOT_SUPPORTED) + errno = ENOTSUP; else errno = EIO; } |
