emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 24b86cb: Fix ACL errors with WebDAV volumes on MS-Windows


From: Eli Zaretskii
Subject: emacs-28 24b86cb: Fix ACL errors with WebDAV volumes on MS-Windows
Date: Thu, 11 Nov 2021 14:42:39 -0500 (EST)

branch: emacs-28
commit 24b86cb4f7aa1e14dd9025428140c5fdae5c5227
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix ACL errors with WebDAV volumes on MS-Windows
    
    * src/w32.c (acl_get_file): Handle ERROR_INVALID_FUNCTION from
    WebDAV.  Patch from Ioannis Kappas <ioannis.kappas@gmail.com>.
    (Bug#51773)
---
 src/w32.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/w32.c b/src/w32.c
index 9fe698d..80e42ac 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -6595,7 +6595,8 @@ acl_get_file (const char *fname, acl_type_t type)
                  xfree (psd);
                  err = GetLastError ();
                  if (err == ERROR_NOT_SUPPORTED
-                     || err == ERROR_ACCESS_DENIED)
+                     || err == ERROR_ACCESS_DENIED
+                     || err == ERROR_INVALID_FUNCTION)
                    errno = ENOTSUP;
                  else if (err == ERROR_FILE_NOT_FOUND
                           || err == ERROR_PATH_NOT_FOUND
@@ -6614,10 +6615,11 @@ acl_get_file (const char *fname, acl_type_t type)
                   || err == ERROR_INVALID_NAME)
            errno = ENOENT;
          else if (err == ERROR_NOT_SUPPORTED
-                  /* ERROR_ACCESS_DENIED is what we get for a volume
-                     mounted by WebDAV, which evidently doesn't
-                     support ACLs.  */
-                  || err == ERROR_ACCESS_DENIED)
+                  /* ERROR_ACCESS_DENIED or ERROR_INVALID_FUNCTION is
+                     what we get for a volume mounted by WebDAV,
+                     which evidently doesn't support ACLs.  */
+                  || err == ERROR_ACCESS_DENIED
+                  || err == ERROR_INVALID_FUNCTION)
            errno = ENOTSUP;
          else
            errno = EIO;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]