Prevent Dired marking in hidden subdirs (bug#81612)

* lisp/dired.el (dired-mark-files-in-region, dired-mark): Don't
mark or flag for deletion if entry is in hidden (sub)dir.
This commit is contained in:
Stephen Berman 2026-09-05 11:39:13 +02:00
parent 2e5e9d48fb
commit cd6bbb7ac2

View file

@ -4637,6 +4637,7 @@ no ARGth marked file is found before this line."
(while (and (< (point) end) (dired-between-files))
(forward-line 1))
(if (and (not (looking-at-p dired-re-dot))
(not (dired--hidden-p))
(dired-get-filename nil t))
(progn
(delete-char 1)
@ -4681,6 +4682,7 @@ this subdir."
(prefix-numeric-value arg)
(lambda ()
(when (or (not (looking-at-p dired-re-dot))
(not (dired--hidden-p))
;; Don't skip symlinks to ".", "..", etc.
(save-excursion
(re-search-forward