Commit 6e8e8e47 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(dired-insert-directory): If file-system-info fails,

remove the " free " part, but don't signal an error.
parent 291c7e74
......@@ -689,9 +689,13 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
;; Non-Posix systems don't always have dired-free-space-program,
;; but might have an equivalent system call.
(if (fboundp 'file-system-info)
(insert
(format "%.0f"
(/ (nth 2 (file-system-info dir-or-list)) 1024)))
(let ((beg (point))
(fsinfo (file-system-info dir-or-list)))
(if fsinfo
(insert
(format "%.0f" (/ (nth 2 fsinfo) 1024)))
;; file-system-info failed; delete " free ".
(delete-region (- beg 7) beg)))
(let ((beg (point)))
(condition-case nil
(if (zerop (call-process dired-free-space-program nil t nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment