From 9b341343a9bdd70c6a8fc1abf166785acad460f8 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 9 Jun 2003 17:05:55 +0000 Subject: [PATCH] (dired-get-filename): Complain only about "." and "..", not all directories. --- lisp/ChangeLog | 5 +++++ lisp/dired.el | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fefd706b0a3..9a4172069cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-06-09 Andreas Schwab + + * dired.el (dired-get-filename): Complain only about "." and "..", + not all directories. + 2003-06-08 Nick Roberts * gdb-ui.el (gdb-get-current-frame, gdb-frame-handler): Use Gdb diff --git a/lisp/dired.el b/lisp/dired.el index db66f78d71d..3aae474a118 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1490,9 +1490,7 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on ((eq localp 'verbatim) file) ((and (not no-error-if-not-filep) - (save-excursion - (beginning-of-line) - (looking-at dired-re-dir))) + (member (file-name-nondirectory file) '("." ".."))) (error "Cannot operate on `.' or `..'")) ((and (eq localp 'no-dir) already-absolute) (file-name-nondirectory file)) -- 2.39.2