diff options
author | Eli Zaretskii <eliz@gnu.org> | 2001-01-14 19:16:07 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2001-01-14 19:16:07 +0000 |
commit | 6e8e8e47a96ce8614f7c52fbba63687ad6e67390 (patch) | |
tree | 5f6b25a4be1f957c7e3b87f7c0d15b6c1bf8d337 /lisp/dired.el | |
parent | 291c7e74d29a51303395956a6cf200f41dd953f8 (diff) | |
download | emacs-6e8e8e47a96ce8614f7c52fbba63687ad6e67390.tar.gz |
(dired-insert-directory): If file-system-info fails,
remove the " free " part, but don't signal an error.
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 |