GNU bug report logs - #3911
get-free-disk-space race condition on default-directory test

Previous Next

Package: emacs;

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

Date: Thu, 23 Jul 2009 22:25:05 UTC

Severity: normal

Tags: patch

Merged with 2631

Done: Kevin Ryde <user42 <at> zip.com.au>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 3911-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Kevin Ryde <user42 <at> zip.com.au>
Cc: 2631-done <at> debbugs.gnu.org, 3911-done <at> debbugs.gnu.org
Subject: Re: get-free-disk-space when default-directory doesn't exist
Date: Sat, 15 Aug 2009 20:34:52 -0400
> 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()...  If
> both default-directory and home directory both don't exist
> get-free-disk-space still gets an error

You're right; it's probably better to fall back on / instead of ~.  I've
just checked in your suggested change.

> (let ((default-directory "/no/such/dir"))
>   (get-free-disk-space "."))
> => 3705637

I checked in your suggestion to do expand-file-name before changing the
default-directory, as well.  Thanks.



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

Previous Next


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