[Top][All Lists]

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

Re: file-readable-p returns t for empty string

From: David Kastrup
Subject: Re: file-readable-p returns t for empty string
Date: 27 Feb 2002 11:23:58 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

address@hidden (Eli Zaretskii) writes:

> On Tue, 26 Feb 2002, Richard Stallman wrote:
> >     That's because all these primitives call expand-file-name internally,
> >     and expand-file-name returns the buffer's default directory when
> >     passed an empty string as an argument.
> > 
> >     I don't know off the top of my head why does expand-file-name do that.
> > 
> > Do you have something better to suggest?
> No.  I'd bet some feature already uses that.

Then that feature should explicitly check for the empty string if it
needs to have it treated as the current directory.  I don't think it
prudent to have (file-exists-p "") return t.  It probably means that
one needs to be careful that one does not collapse away "./" in the
course of canonicizing file names if that would leave the empty

David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: address@hidden

reply via email to

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