From: Eli Zaretskii Date: Fri, 11 Aug 2023 12:03:48 +0000 (+0300) Subject: ; * lisp/files.el (delete-file): Add expand-file-name back. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4fa75771d17800651cab6f1e97bc7fbb1f3e874b;p=emacs.git ; * lisp/files.el (delete-file): Add expand-file-name back. --- 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)))))