GNU bug report logs - #15130
24.3.50; emacs-24.3.1 on Windows; possible `file-directory-p' bug.

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Mon, 19 Aug 2013 08:49:02 UTC

Severity: normal

Found in version 24.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 15130 <at> debbugs.gnu.org
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 <at> gmail.com>
> Cc: 15130 <at> 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.




This bug report was last modified 11 years and 280 days ago.

Previous Next


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