GNU bug report logs - #5982
23.1.96; Dired regression - recursive copies turn symlinks into regular files

Previous Next

Package: emacs;

Reported by: Sven Joachim <svenjoac <at> gmx.de>

Date: Tue, 20 Apr 2010 09:27:02 UTC

Severity: serious

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 5982 <at> debbugs.gnu.org (full text, mbox):

From: Sven Joachim <svenjoac <at> gmx.de>
To: 5982 <at> debbugs.gnu.org
Subject: Re: bug#5982: 23.1.96;
	Dired regression - recursive copies turn symlinks into regular files
Date: Tue, 20 Apr 2010 15:49:33 +0200
On 2010-04-20 11:26 +0200, Sven Joachim wrote:

> Suppose we have the following directory in dired:
>
> ,----
> |   /tmp/foo:
> |   total used in directory 4 available 1674380
> |   drwxr-xr-x  2 sven sven  80 Apr 20 11:12 .
> |   drwxrwxrwt 14 root root 300 Apr 20 11:12 ..
> |   -rw-r--r--  1 sven sven   6 Apr 20 11:09 bar
> |   lrwxrwxrwx  1 sven sven   3 Apr 20 11:12 bar2 -> bar
> `----
>
> Now type ^ to cd to the parent directory, move to the "foo" line and
> press "C /tmp/foo2 RET yes" (confirming the recursive copy and creating
> /tmp/foo2) and switch to the new directory.  It looks like this:
>
> ,----
> |   /tmp/foo2:
> |   total used in directory 8 available 1674380
> |   drwxr-xr-x  2 sven sven  80 Apr 20 11:12 .
> |   drwxrwxrwt 14 root root 300 Apr 20 11:12 ..
> |   -rw-r--r--  1 sven sven   6 Apr 20 11:09 bar
> |   -rw-r--r--  1 sven sven   6 Apr 20 11:09 bar2
> `----
>
> This is a regression from Emacs 23.1 and 22.3 where the symlink would be
> copied as such instead of turning into a regular file.

Bisecting shows that this problem first occured in revision 97979 when
dired-copy-file-recursive started to use the new copy-directory command
(added in revision 97978).  The latter just calls copy-file for
non-directories, and copy-file has no option to preserve symlinks.

Sven




This bug report was last modified 15 years and 38 days ago.

Previous Next


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