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

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

bug#15130: 24.3.50; emacs-24.3.1 on Windows; possible `file-directory-p'


From: Thierry Volpiatto
Subject: bug#15130: 24.3.50; emacs-24.3.1 on Windows; possible `file-directory-p' bug.
Date: Tue, 20 Aug 2013 16:37:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
>> Cc: 15130@debbugs.gnu.org
>> Date: Tue, 20 Aug 2013 13:47:21 +0200
>> 
>> BTW, actually using:
>> 
>>    (eq t (car (file-attributes (file-name-as-directory directory))))
>> 
>> seems to be an option to know if we really have a directory named " ".
>
> I suggest to use file-accessible-directory-p instead of
> file-attributes, the former is much cheaper on MS-Windows.

Great, thanks.

> And if you are wondering why file-accessible-directory-p works where
> file-directory-p doesn't, then the reason is that the latter
> internally removes trailing slashes, so file-name-as-directory has no
> effect in that case.

Ok.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





reply via email to

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