[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28451: 26.0.50; copy-directory no longer creates parent directories
From: |
Paul Eggert |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
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