diff options
author | Andreas Schwab <schwab@suse.de> | 2003-06-09 17:05:55 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2003-06-09 17:05:55 +0000 |
commit | 9b341343a9bdd70c6a8fc1abf166785acad460f8 (patch) | |
tree | f3ea6fd235d214a3147d38c24e2700f8011b3e52 /lisp/dired.el | |
parent | 15a893fa2841ca1ea6209c21c995846f413b5cbd (diff) | |
download | emacs-9b341343a9bdd70c6a8fc1abf166785acad460f8.tar.gz |
(dired-get-filename): Complain only about "." and "..",
not all directories.
Diffstat (limited to 'lisp/dired.el')
-rw-r--r-- | lisp/dired.el | 4 |
1 files changed, 1 insertions, 3 deletions
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)) |