[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: |
Eli Zaretskii |
Subject: |
bug#15130: 24.3.50; emacs-24.3.1 on Windows; possible `file-directory-p' bug. |
Date: |
Tue, 20 Aug 2013 17:29:48 +0300 |
> 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.
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.