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: Kevin Ryde
Subject: bug#2631: get-free-disk-space when default-directory doesn't exist
Date: Tue, 17 Mar 2009 11:02:26 +1100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Chong Yidong <address@hidden> writes:
>
> default-directory to "~/" rather than "/"

What is it that's not good about "/"?  It doesn't have to be readable or
anything I don't think, just somewhere capable of a chdir().  Wouldn't
it be the only thing certain to work with chdir()?  As I mentioned
before there's other places using "/" for the same purpose if there's
something wrong with it.


Either way what I missed from my first post was that a change to
default-directory ought to absolutize the given dir argument, so that
say

    (get-free-disk-space ".")

gives info about the original default-directory, not the mangled one.

*** files.el    17 Mar 2009 10:35:50 +1100      1.1040
--- files.el    17 Mar 2009 10:53:40 +1100      
***************
*** 5341,5346 ****
--- 5341,5347 ----
                                      (file-directory-p default-directory)
                                      (file-readable-p default-directory))
                                 default-directory
+                              (setq dir (expand-file-name dir))
                               (expand-file-name "~/"))))
                       (eq (call-process directory-free-space-program
                                         nil t nil

reply via email to

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