From: Glenn Morris Date: Sat, 20 Sep 2008 21:29:03 +0000 (+0000) Subject: David De La Harpe Golden X-Git-Tag: emacs-pretest-23.0.90~2826 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3102b3426386eb9537ab02a75964a7a4246da135;p=emacs.git David De La Harpe Golden (move-file-to-trash): Avoid recursive trashing if rename-file calls delete-file. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ec29db2649a..4617cf81427 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-09-20 David De La Harpe Golden + + * files.el (move-file-to-trash): Avoid recursive trashing if + rename-file calls delete-file. + 2008-09-20 Glenn Morris * play/fortune.el: Remove leading `*' from defcustom docs. diff --git a/lisp/files.el b/lisp/files.el index 06a3e28768b..03a3a03cbb2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5828,7 +5828,8 @@ Returns nil on success." (and (string-match fn trash-dir) (error "Filename `%s' is same or parent directory of trash-directory" filename)) - (rename-file fn new-fn))))) + (let ((delete-by-moving-to-trash nil)) + (rename-file fn new-fn)))))) (define-key ctl-x-map "\C-f" 'find-file)