Mercurial > emacs
changeset 32672:070d01d7f871
(dired-insert-directory): Do not let errors signalled by
attempt to run dired-free-space-program prevent dired from working.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Thu, 19 Oct 2000 19:50:13 +0000 |
parents | bbd3be4db5f2 |
children | 7c929610d127 |
files | lisp/dired.el |
diffstat | 1 files changed, 17 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired.el Thu Oct 19 19:25:53 2000 +0000 +++ b/lisp/dired.el Thu Oct 19 19:50:13 2000 +0000 @@ -687,21 +687,23 @@ (when (re-search-forward "total [0-9]+$" nil t) (insert " free ") (let ((beg (point))) - (if (zerop (call-process dired-free-space-program nil t nil - dired-free-space-args - (expand-file-name dir-or-list))) - (progn - (goto-char beg) - (forward-line 1) - (skip-chars-forward "^ \t") - (forward-word 2) - (skip-chars-forward " \t") - (delete-region beg (point)) - (forward-word 1) - (delete-region (point) - (progn (forward-line 1) (point)))) - ;; The dired-free-space-program failed; delete its output - (delete-region (- beg 7) (point)))))))) + (condition-case nil + (if (zerop (call-process dired-free-space-program nil t nil + dired-free-space-args + (expand-file-name dir-or-list))) + (progn + (goto-char beg) + (forward-line 1) + (skip-chars-forward "^ \t") + (forward-word 2) + (skip-chars-forward " \t") + (delete-region beg (point)) + (forward-word 1) + (delete-region (point) + (progn (forward-line 1) (point)))) + ;; The dired-free-space-program failed; delete its output + (delete-region (- beg 7) (point))) + (error (delete-region (- beg 7) (point))))))))) ;; Quote certain characters, unless ls quoted them for us. (if (not (string-match "b" dired-actual-switches)) (save-excursion