Fix accessing files on networked drives on MS-Windows
* src/w32.c (acl_get_file): Set errno to ENOTSUP if get_file_security returns ERROR_NOT_SUPPORTED. (Bug#41463)
This commit is contained in:
parent
c0aa2f2abf
commit
a10254dd46
1 changed files with 11 additions and 1 deletions
12
src/w32.c
12
src/w32.c
|
@ -6398,7 +6398,15 @@ acl_get_file (const char *fname, acl_type_t type)
|
||||||
if (!get_file_security (fname, si, psd, sd_len, &sd_len))
|
if (!get_file_security (fname, si, psd, sd_len, &sd_len))
|
||||||
{
|
{
|
||||||
xfree (psd);
|
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;
|
psd = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6409,6 +6417,8 @@ acl_get_file (const char *fname, acl_type_t type)
|
||||||
be encoded in the current ANSI codepage. */
|
be encoded in the current ANSI codepage. */
|
||||||
|| err == ERROR_INVALID_NAME)
|
|| err == ERROR_INVALID_NAME)
|
||||||
errno = ENOENT;
|
errno = ENOENT;
|
||||||
|
else if (err == ERROR_NOT_SUPPORTED)
|
||||||
|
errno = ENOTSUP;
|
||||||
else
|
else
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue