aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2020-09-29 18:21:23 +0300
committerEli Zaretskii2020-09-29 18:21:23 +0300
commit90e5549f027f01c16f6f34e55c33d8a549fb32e7 (patch)
treeb861497d32c586257b683c89c96ba6b4ba2d7072 /src
parent6f73cc357994c2776ff8cd4f12804ebb20d29efd (diff)
downloademacs-90e5549f027f01c16f6f34e55c33d8a549fb32e7.tar.gz
emacs-90e5549f027f01c16f6f34e55c33d8a549fb32e7.zip
Don't signal an error when saving files on WdebDAV volumes
* src/w32.c (acl_get_file): If get_file_security raises the ERROR_ACCESS_DENIED error, treat that like unsupported ACLs.
Diffstat (limited to 'src')
-rw-r--r--src/w32.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/w32.c b/src/w32.c
index 78e75f0937e..6fed5ba8d3d 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -6399,7 +6399,8 @@ acl_get_file (const char *fname, acl_type_t type)
6399 { 6399 {
6400 xfree (psd); 6400 xfree (psd);
6401 err = GetLastError (); 6401 err = GetLastError ();
6402 if (err == ERROR_NOT_SUPPORTED) 6402 if (err == ERROR_NOT_SUPPORTED
6403 || err == ERROR_ACCESS_DENIED)
6403 errno = ENOTSUP; 6404 errno = ENOTSUP;
6404 else if (err == ERROR_FILE_NOT_FOUND 6405 else if (err == ERROR_FILE_NOT_FOUND
6405 || err == ERROR_PATH_NOT_FOUND 6406 || err == ERROR_PATH_NOT_FOUND
@@ -6417,7 +6418,11 @@ acl_get_file (const char *fname, acl_type_t type)
6417 be encoded in the current ANSI codepage. */ 6418 be encoded in the current ANSI codepage. */
6418 || err == ERROR_INVALID_NAME) 6419 || err == ERROR_INVALID_NAME)
6419 errno = ENOENT; 6420 errno = ENOENT;
6420 else if (err == ERROR_NOT_SUPPORTED) 6421 else if (err == ERROR_NOT_SUPPORTED
6422 /* ERROR_ACCESS_DENIED is what we get for a volume
6423 mounted by WebDAV, which evidently doesn't
6424 support ACLs. */
6425 || err == ERROR_ACCESS_DENIED)
6421 errno = ENOTSUP; 6426 errno = ENOTSUP;
6422 else 6427 else
6423 errno = EIO; 6428 errno = EIO;