From 7994d91a523be9058c62178d0f40d42ce860e2e4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 26 Jun 2001 17:10:56 +0000 Subject: [PATCH] (dired-get-filename): A file name starting with ~ is not absolute in this context. --- lisp/dired.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/dired.el b/lisp/dired.el index 546de206aee..987d8ddd899 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1438,6 +1438,9 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on file) "\""))))) (and file (file-name-absolute-p file) + ;; A relative file name can start with ~. + ;; Don't treat it as absolute in this context. + (not (eq (aref file 0) ?~)) (setq already-absolute t)) (and file buffer-file-coding-system (not file-name-coding-system) -- 2.39.5