aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/w32.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/w32.c b/src/w32.c
index 62c53fd7711..78e75f0937e 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -6398,7 +6398,15 @@ acl_get_file (const char *fname, acl_type_t type)
6398 if (!get_file_security (fname, si, psd, sd_len, &sd_len)) 6398 if (!get_file_security (fname, si, psd, sd_len, &sd_len))
6399 { 6399 {
6400 xfree (psd); 6400 xfree (psd);
6401 errno = EIO; 6401 err = GetLastError ();
6402 if (err == ERROR_NOT_SUPPORTED)
6403 errno = ENOTSUP;
6404 else if (err == ERROR_FILE_NOT_FOUND
6405 || err == ERROR_PATH_NOT_FOUND
6406 || err == ERROR_INVALID_NAME)
6407 errno = ENOENT;
6408 else
6409 errno = EIO;
6402 psd = NULL; 6410 psd = NULL;
6403 } 6411 }
6404 } 6412 }
@@ -6409,6 +6417,8 @@ acl_get_file (const char *fname, acl_type_t type)
6409 be encoded in the current ANSI codepage. */ 6417 be encoded in the current ANSI codepage. */
6410 || err == ERROR_INVALID_NAME) 6418 || err == ERROR_INVALID_NAME)
6411 errno = ENOENT; 6419 errno = ENOENT;
6420 else if (err == ERROR_NOT_SUPPORTED)
6421 errno = ENOTSUP;
6412 else 6422 else
6413 errno = EIO; 6423 errno = EIO;
6414 } 6424 }