[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp files.el
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/lisp files.el |
Date: |
Sun, 15 Mar 2009 02:31:46 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/03/15 02:31:46
Modified files:
lisp : files.el
Log message:
(get-free-disk-space): Ensure that default-directory is
usable before calling call-process. Suggested by Kevin
Ryde (Bug#2631).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/files.el?cvsroot=emacs&r1=1.1039&r2=1.1040
Patches:
Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1039
retrieving revision 1.1040
diff -u -b -r1.1039 -r1.1040
--- files.el 13 Mar 2009 15:58:07 -0000 1.1039
+++ files.el 15 Mar 2009 02:31:45 -0000 1.1040
@@ -5336,10 +5336,17 @@
(save-match-data
(with-temp-buffer
(when (and directory-free-space-program
- (eq 0 (call-process directory-free-space-program
+ (let ((default-directory
+ (if (and (not (file-remote-p default-directory))
+ (file-directory-p default-directory)
+ (file-readable-p default-directory))
+ default-directory
+ (expand-file-name "~/"))))
+ (eq (call-process directory-free-space-program
nil t nil
directory-free-space-args
- dir)))
+ dir)
+ 0)))
;; Usual format is a header line followed by a line of
;; numbers.
(goto-char (point-min))