> On Sep 13, 2017, at 6:22 PM, Paul Eggert wrote: > > Thanks for the bug report and test case. I cannot reproduce the problem on Fedora 26 x86-64. > > What are the permissions on the files and directories involved? E.g., 'cd; ls -lR a test'. > > I have a sneaking suspicion that the problem lies in the recent changes I made to make-directory (commit cf9891e14e48a93bca2065fdd7998f5f677786dc). Can you please try something like this: > > cd > rm -fr a test > mkdir -p a test/{a,b,c,d} > strace -o tr path/to/emacs -Q -batch -eval '(copy-directory "~/test" "~/a/new/directory/" t t t)' > grep mkdir tr > > Here's what I observe on Fedora: > > mkdir("/home/eggert/a/new/directory/a", 0777) = -1 ENOENT (No such file or directory) > mkdir("/home/eggert/a/new/directory", 0777) = -1 ENOENT (No such file or directory) > mkdir("/home/eggert/a/new", 0777) = 0 > mkdir("/home/eggert/a/new/directory", 0777) = 0 > mkdir("/home/eggert/a/new/directory/a", 0777) = 0 > mkdir("/home/eggert/a/new/directory/b", 0777) = 0 > mkdir("/home/eggert/a/new/directory/c", 0777) = 0 > mkdir("/home/eggert/a/new/directory/d", 0777) = 0 > > which has the desired behavior. If Darwin doesn't have strace, please use the equivalent there to trace system calls > > If you don't have an strace equivalent, please try make-directory and see whether it has a similar problem: > > cd > rm -fr a > mkdir a > path/to/emacs -Q -batch -eval '(make-directory "a/new/directory/a" t)' > ls -al a/new/directory/a >