1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 12:59:26 +00:00

Always expand "total" in dired

* lisp/files.el (insert-directory): Always replace "total" with
"total used in directory", even when we don't have free disk space
(bug#13191).  This makes the display more consistent.
This commit is contained in:
Christopher Schmidt 2019-11-23 15:45:56 +01:00 committed by Lars Ingebrigtsen
parent 311ca036f4
commit b9e99ab5ac

View File

@ -7153,10 +7153,11 @@ normally equivalent short `-D' option is just passed on to
(goto-char beg)
;; First find the line to put it on.
(when (re-search-forward "^ *\\(total\\)" nil t)
;; Replace "total" with "total used in directory" to
;; avoid confusion.
(replace-match "total used in directory" nil nil nil 1)
(let ((available (get-free-disk-space ".")))
(when available
;; Replace "total" with "used", to avoid confusion.
(replace-match "total used in directory" nil nil nil 1)
(end-of-line)
(insert " available " available))))))))))