From 4fa75771d17800651cab6f1e97bc7fbb1f3e874b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 11 Aug 2023 15:03:48 +0300 Subject: [PATCH] ; * lisp/files.el (delete-file): Add expand-file-name back. --- lisp/files.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 685eb5fc957..69c4a33cdeb 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6374,7 +6374,8 @@ With a prefix argument, TRASH is nil." (null current-prefix-arg))) (if (and (file-directory-p filename) (not (file-symlink-p filename))) (signal 'file-error (list "Removing old name: is a directory" filename))) - (let* ((handler (find-file-name-handler filename 'delete-file))) + (let* ((filename (expand-file-name filename)) + (handler (find-file-name-handler filename 'delete-file))) (cond (handler (funcall handler 'delete-file filename trash)) ((and delete-by-moving-to-trash trash) (move-file-to-trash filename)) (t (delete-file-internal filename))))) -- 2.39.2