Mercurial > emacs
diff lisp/files.el @ 108340:486e3cc1b3a6
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Tue, 20 Apr 2010 22:41:29 +0000 |
parents | 297d4e80151f |
children | 973b5bc5fcfe 3a80fc3735bf |
line wrap: on
line diff
--- a/lisp/files.el Mon Apr 19 22:42:15 2010 +0000 +++ b/lisp/files.el Tue Apr 20 22:41:29 2010 +0000 @@ -4735,10 +4735,14 @@ (mapc (lambda (file) (let ((target (expand-file-name - (file-name-nondirectory file) newname))) - (if (file-directory-p file) - (copy-directory file target keep-time parents) - (copy-file file target t keep-time)))) + (file-name-nondirectory file) newname)) + (attrs (file-attributes file))) + (cond ((file-directory-p file) + (copy-directory file target keep-time parents)) + ((stringp (car attrs)) ; Symbolic link + (make-symbolic-link (car attrs) target t)) + (t + (copy-file file target t keep-time))))) ;; We do not want to copy "." and "..". (directory-files directory 'full directory-files-no-dot-files-regexp))