1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Don't skip links to "." and ".." in Dired when marking files

* lisp/dired.el (dired-mark): Skip "." and "..", but not symlinks
to those two.  (Bug#38729)  (Bug#68814)
This commit is contained in:
Eli Zaretskii 2024-02-08 13:51:55 +02:00
parent e25d11314d
commit e268231686

View File

@ -4110,6 +4110,11 @@ this subdir."
(prefix-numeric-value arg)
(lambda ()
(when (or (not (looking-at-p dired-re-dot))
;; Don't skip symlinks to ".", "..", etc.
(save-excursion
(re-search-forward
dired-permission-flags-regexp nil t)
(eq (char-after (match-beginning 1)) ?l))
(not (equal dired-marker-char dired-del-marker)))
(delete-char 1)
(insert dired-marker-char))))))))