summaryrefslogtreecommitdiff
path: root/lisp/dired.el
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2000-10-19 19:50:13 +0000
committerJason Rumney <jasonr@gnu.org>2000-10-19 19:50:13 +0000
commit783e8230866622b5469c8dd320bfab59e78079d7 (patch)
tree57258dcd7c7843cbcea2862ef90518591facb54e /lisp/dired.el
parent0b6bb670882121224aec4a76555b2c526fdf8d03 (diff)
downloademacs-783e8230866622b5469c8dd320bfab59e78079d7.tar.gz
(dired-insert-directory): Do not let errors signalled by
attempt to run dired-free-space-program prevent dired from working.
Diffstat (limited to 'lisp/dired.el')
-rw-r--r--lisp/dired.el32
1 files changed, 17 insertions, 15 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 5308cdb7e1a..795ca3c3005 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -687,21 +687,23 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
(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