[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in copy-directory

From: Thierry Volpiatto
Subject: Re: bug in copy-directory
Date: Wed, 02 Feb 2011 09:19:08 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.92 (gnu/linux)

Michael Albinus <address@hidden> writes:

> Chong Yidong <address@hidden> writes:
>> Michael Albinus <address@hidden> writes:

> It works fine, thank you. But there seems to be a bug in dired; when I
> copy "/tmp/test" to "~/" twice, I see the corrupted directory structure.
Michael and Chong, could you try on your side, using the last version of
copy-directory, modify the call to dired-create-files in
dired-do-create-files something like this: (not tested in dired yet)

     fn (symbol-name action) files
     ;; CANDIDATE is the destination.
     (if (file-directory-p candidate)
         ;; When CANDIDATE is a directory, build file-name in this directory.
         ;; Else we use CANDIDATE.
         #'(lambda (from)
             (let ((target (expand-file-name (file-name-nondirectory from) 
               (if (file-directory-p target) candidate target)))
         #'(lambda (from) candidate))

NOTE: the message "Overwrite ..." will be wrong, ignore it for the
moment (use non--important dirs to be sure).

A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]