bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2631: get-free-disk-space when default-directory doesn't exist


From: Stefan Monnier
Subject: bug#2631: get-free-disk-space when default-directory doesn't exist
Date: Tue, 10 Mar 2009 22:10:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux)

> *** files.el  11 Mar 2009 08:46:04 +1100      1.1038
> --- files.el  11 Mar 2009 09:14:14 +1100      
> ***************
> *** 5336,5345 ****
>         (save-match-data
>       (with-temp-buffer
>         (when (and directory-free-space-program
> !                  (eq 0 (call-process directory-free-space-program
> !                                      nil t nil
> !                                      directory-free-space-args
> !                                      dir)))
>           ;; Usual format is a header line followed by a line of
>           ;; numbers.
>           (goto-char (point-min))
> --- 5336,5346 ----
>         (save-match-data
>       (with-temp-buffer
>         (when (and directory-free-space-program
> !                      (let ((default-directory "/"))
> !                        (eq 0 (call-process directory-free-space-program
> !                                            nil t nil
> !                                            directory-free-space-args
> !                                            dir))))
>           ;; Usual format is a header line followed by a line of
>           ;; numbers.
>           (goto-char (point-min))

That would probably work OK, but why not bind default-directory to dir?
And even use process-file, while we're at it, so it has a chance to work
on Tramp.


        Stefan








reply via email to

[Prev in Thread] Current Thread [Next in Thread]