changeset 98274:7d8f4fcd876c

David De La Harpe Golden <david at harpegolden.net> (move-file-to-trash): Avoid recursive trashing if rename-file calls delete-file.
author Glenn Morris <rgm@gnu.org>
date Sat, 20 Sep 2008 21:28:34 +0000
parents e3ddbeb0a61f
children 99266150cba5
files lisp/files.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sat Sep 20 21:14:57 2008 +0000
+++ b/lisp/files.el	Sat Sep 20 21:28:34 2008 +0000
@@ -5828,7 +5828,8 @@
       (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)