help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Why does (file-exists-p "") return t?


From: Bruno Barbier
Subject: Re: Why does (file-exists-p "") return t?
Date: Sat, 11 Feb 2023 11:10:03 +0100

Jean Louis <bugs@gnu.support> writes:

> * Edgar Vincent <e-v@posteo.net> [2023-02-10 00:11]:
>> I didn’t know that file-exists-p used expand-file-name, but it does seem 
>> obvious.
>
> To avoid the problem maybe you should use `expand-file-name' before
> you check it with `file-exists-p'
>
> As otherwise you may check the wrong path.

Why ?

One of the first thing `file-exists-p' is doing is to call
`expand-file-name' to expand the file name.  I don't see how calling
`expand-file-name' before would help.

Bruno



reply via email to

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