mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-03 10:53:23 +00:00
Fix detection of Dired with files whose name ends in a colon
* lisp/dired.el (dired-build-subdir-alist): Use a more general regexp to detect file entries whose names end in a colon, when various non-default 'ls' switches are used. (Bug#78493)
This commit is contained in:
parent
056ba8c569
commit
463787c4e9
1 changed files with 8 additions and 3 deletions
|
@ -3721,7 +3721,13 @@ instead of `dired-actual-switches'."
|
|||
;; ange-ftp listings.
|
||||
(and (dired-switches-recursive-p switches)
|
||||
(string-match "\\`/.*:\\(/.*\\)" default-directory)
|
||||
(concat "\\`" (match-string 1 default-directory)))))
|
||||
(concat "\\`" (match-string 1 default-directory))))
|
||||
;; Regexp that describes the beginning of line of a
|
||||
;; file/directory entry (as opposed to a subdirectory
|
||||
;; heading), including the optional mark, inode, and size.
|
||||
(file-entry-beg-re (concat dired-re-maybe-mark
|
||||
dired-re-inode-size
|
||||
dired-re-perms)))
|
||||
(goto-char (point-min))
|
||||
(setq dired-subdir-alist nil)
|
||||
(while (re-search-forward dired-subdir-regexp nil t)
|
||||
|
@ -3730,8 +3736,7 @@ instead of `dired-actual-switches'."
|
|||
(unless (save-excursion
|
||||
(goto-char (match-beginning 0))
|
||||
(beginning-of-line)
|
||||
(forward-char 2)
|
||||
(looking-at-p dired-re-perms))
|
||||
(looking-at-p file-entry-beg-re))
|
||||
(save-excursion
|
||||
(goto-char (match-beginning 1))
|
||||
(setq new-dir-name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue