[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 a10254d: Fix accessing files on networked drives on MS-Windows
From: |
Eli Zaretskii |
Subject: |
emacs-27 a10254d: Fix accessing files on networked drives on MS-Windows |
Date: |
Sat, 23 May 2020 01:51:24 -0400 (EDT) |
branch: emacs-27
commit a10254dd46da920d14dd990714d0f21fd508d07d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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)
---
src/w32.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/w32.c b/src/w32.c
index 62c53fd..78e75f0 100644
--- a/src/w32.c
+++ b/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))
{
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;
}
}
@@ -6409,6 +6417,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;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-27 a10254d: Fix accessing files on networked drives on MS-Windows,
Eli Zaretskii <=