diff options
| author | Chong Yidong | 2010-04-20 18:28:26 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-04-20 18:28:26 -0400 |
| commit | 99833607e0b6a5a49159ecedfa8ad40eb1671f6c (patch) | |
| tree | 35b20da1b0de89391f426c6d00cbf865e6a55c08 /lisp | |
| parent | 790c2e44de7d6fcddceab31f1d18b1beb00267f3 (diff) | |
| download | emacs-99833607e0b6a5a49159ecedfa8ad40eb1671f6c.tar.gz emacs-99833607e0b6a5a49159ecedfa8ad40eb1671f6c.zip | |
* files.el (copy-directory): Handle symlinks (Bug#5982).
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/files.el | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6cf40c75d6c..8a8f7ef9732 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2010-04-20 Chong Yidong <cyd@stupidchicken.com> | 1 | 2010-04-20 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 2 | ||
| 3 | * files.el (copy-directory): Handle symlinks (Bug#5982). | ||
| 4 | |||
| 3 | * progmodes/compile.el (compilation-next-error-function): Revert | 5 | * progmodes/compile.el (compilation-next-error-function): Revert |
| 4 | 2009-10-12 change (Bug#5983). | 6 | 2009-10-12 change (Bug#5983). |
| 5 | 7 | ||
diff --git a/lisp/files.el b/lisp/files.el index 99fa7ddf1b5..76345034c6e 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4735,10 +4735,14 @@ this happens by default." | |||
| 4735 | (mapc | 4735 | (mapc |
| 4736 | (lambda (file) | 4736 | (lambda (file) |
| 4737 | (let ((target (expand-file-name | 4737 | (let ((target (expand-file-name |
| 4738 | (file-name-nondirectory file) newname))) | 4738 | (file-name-nondirectory file) newname)) |
| 4739 | (if (file-directory-p file) | 4739 | (attrs (file-attributes file))) |
| 4740 | (copy-directory file target keep-time parents) | 4740 | (cond ((file-directory-p file) |
| 4741 | (copy-file file target t keep-time)))) | 4741 | (copy-directory file target keep-time parents)) |
| 4742 | ((stringp (car attrs)) ; Symbolic link | ||
| 4743 | (make-symbolic-link (car attrs) target t)) | ||
| 4744 | (t | ||
| 4745 | (copy-file file target t keep-time))))) | ||
| 4742 | ;; We do not want to copy "." and "..". | 4746 | ;; We do not want to copy "." and "..". |
| 4743 | (directory-files directory 'full directory-files-no-dot-files-regexp)) | 4747 | (directory-files directory 'full directory-files-no-dot-files-regexp)) |
| 4744 | 4748 | ||