]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix disk-free info in 'insert-directory'
authorJohn Cummings <john@rootabega.net>
Thu, 16 Sep 2021 23:00:50 +0000 (23:00 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 17 Sep 2021 07:03:15 +0000 (10:03 +0300)
* lisp/files.el (insert-directory): Call 'get-free-disk-space'
with the argument FILE, to make sure the reported info is for the
correct volume.  (Bug#50630)

Copyright-paperwork-exempt: yes

lisp/files.el

index 3a397f812ec263c6ed186d19f3a64b3d583da9a9..b113ff32f2ff2a98a3e528a74b12b7c975729d06 100644 (file)
@@ -7615,7 +7615,7 @@ normally equivalent short `-D' option is just passed on to
                  ;; 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 ".")))
+                 (let ((available (get-free-disk-space file)))
                    (when available
                      (end-of-line)
                      (insert " available " available))))))))))