Fix bug#10489: 24.0.92 `dired-do-copy' may create infinite directory hierarchy.
commit25b2e303b07ba9b68c2749754c6cca88f0ecac91
authorthierry volpiatto <thierry.volpiatto@gmail.com>
Fri, 24 Feb 2012 18:04:03 +0000 (24 19:04 +0100)
committerthierry volpiatto <thierry.volpiatto@gmail.com>
Fri, 24 Feb 2012 18:04:03 +0000 (24 19:04 +0100)
tree8c3f668f8af2e61649ac6dfa3f3f802f7dc0aca0
parent58b65bf58c3527e862afd40b64fb54dc116538d5
Fix bug#10489: 24.0.92 `dired-do-copy' may create infinite directory hierarchy.

* lisp/files.el (files-equal-p): New, simple equality check between two filename.
(file-subdir-of-p): New, Check if dir1 is subdir of dir2.
(copy-directory): Return error when trying to copy a directory on itself.
Add missing copy-contents arg to tramp handler.

* lisp/dired-aux.el (dired-copy-file-recursive): Same.
(dired-create-files): Modify destination when source is equal to dest when copying files.
Return also when dest is a subdir of source.
lisp/ChangeLog
lisp/dired-aux.el
lisp/files.el