(dired-get-filename): Complain only about "." and "..",
authorAndreas Schwab <schwab@suse.de>
Mon, 9 Jun 2003 17:05:55 +0000 (17:05 +0000)
committerAndreas Schwab <schwab@suse.de>
Mon, 9 Jun 2003 17:05:55 +0000 (17:05 +0000)
not all directories.

lisp/ChangeLog
lisp/dired.el

index fefd706..9a41720 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-09  Andreas Schwab  <schwab@suse.de>
+
+       * dired.el (dired-get-filename): Complain only about "." and "..",
+       not all directories.
+
 2003-06-08  Nick Roberts  <nick@nick.uklinux.net>
 
        * gdb-ui.el (gdb-get-current-frame, gdb-frame-handler): Use Gdb
index db66f78..3aae474 100644 (file)
@@ -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))