GNU bug report logs - #2631
get-free-disk-space when home dir also doesn't exist

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Tue, 10 Mar 2009 22:30:03 UTC

Severity: normal

Tags: patch

Merged with 3911

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kevin Ryde <user42 <at> zip.com.au>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 2631 <at> debbugs.gnu.org
Subject: bug#2631: get-free-disk-space when default-directory doesn't exist
Date: Tue, 17 Mar 2009 11:02:26 +1100
[Message part 1 (text/plain, inline)]
Chong Yidong <cyd <at> stupidchicken.com> 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.disk-space-expand.diff (text/x-diff, inline)]
*** 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

This bug report was last modified 14 years and 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.