From 3102b3426386eb9537ab02a75964a7a4246da135 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 20 Sep 2008 21:29:03 +0000 Subject: [PATCH] David De La Harpe Golden (move-file-to-trash): Avoid recursive trashing if rename-file calls delete-file. --- lisp/ChangeLog | 5 +++++ lisp/files.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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) -- 2.39.5