GNU bug report logs - #28451
26.0.50; copy-directory no longer creates parent directories of target if they do not exist

Previous Next

Package: emacs;

Reported by: Andrew Christianson <emacs <at> a.ndrew.pw>

Date: Wed, 13 Sep 2017 20:46:02 UTC

Severity: normal

Found in version 26.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Andrew Christianson <emacs <at> a.ndrew.pw>
Cc: 28451 <at> debbugs.gnu.org
Subject: bug#28451: 26.0.50; copy-directory no longer creates parent directories of target if they do not exist
Date: Wed, 13 Sep 2017 18:22:21 -0700
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





This bug report was last modified 7 years and 307 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.