diff options
Diffstat (limited to 'lisp/dired.el')
-rw-r--r-- | lisp/dired.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 4a9a637797c..7b77ee77239 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -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 |