]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix ACL errors with WebDAV volumes on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Thu, 11 Nov 2021 19:41:10 +0000 (21:41 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 11 Nov 2021 19:41:10 +0000 (21:41 +0200)
* 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

index 9fe698d28d7207bc00225c609009c49387ab781f..80e42acf50055778887c62a126a6592e2a220fb4 100644 (file)
--- 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;