Commit 99833607 authored by Chong Yidong's avatar Chong Yidong
Browse files

* files.el (copy-directory): Handle symlinks (Bug#5982).

parent 790c2e44
2010-04-20 Chong Yidong <>
* files.el (copy-directory): Handle symlinks (Bug#5982).
* progmodes/compile.el (compilation-next-error-function): Revert
2009-10-12 change (Bug#5983).
......@@ -4735,10 +4735,14 @@ this happens by default."
(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))
(copy-file file target t keep-time)))))
;; We do not want to copy "." and "..".
(directory-files directory 'full directory-files-no-dot-files-regexp))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment