changeset 51531:897048819781

(dired-get-filename): Complain only about "." and "..", not all directories.
author Andreas Schwab <schwab@suse.de>
date Mon, 09 Jun 2003 17:05:42 +0000
parents 91b62df06274
children 4ecd894b3fd4
files lisp/dired.el
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired.el	Sun Jun 08 01:22:30 2003 +0000
+++ b/lisp/dired.el	Mon Jun 09 17:05:42 2003 +0000
@@ -1490,9 +1490,7 @@
      ((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))