Subject: bug#13702: 24.3.50; dired-do-rename: Mysterious error "(file-error Getting ACL no such file or directory <existing file>)"

From: Romain Francoise <[email-masked]>
Date: Wed, 13 Feb 2013 10:39:20 +0100

Carsten Bormann <[email-masked]> writes:

> Move `/Users/cabo/demo0/y' to `/net/ull.local/Volumes/buf2b/demo1/y' failed:
> (file-error Getting ACL no such file or directory /Users/cabo/demo0/y)

Thanks for the report. Google suggests that on Darwin, getting ENOENT from
acl_get_fd() means that the associated file doesn't have an ACL:

 http://lists.apple.com/archives/darwin-dev/2009/Jan/msg00001.html

So the following patch will probably fix things for you:

diff --git a/src/fileio.c b/src/fileio.c
index 89ad339..29c8bf5 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2090,7 +2090,7 @@ entries (depending on how Emacs was built).  */)
 
 #ifdef HAVE_POSIX_ACL
       acl = acl_get_fd (ifd);
-      if (acl == NULL && errno != ENOTSUP)
+      if (acl == NULL && errno != ENOTSUP && errno != ENOENT)
 	report_file_error ("Getting ACL", Fcons (file, Qnil));
 #endif
     }