GNU bug report logs - #43375
26.1: file-directory-p returns t for empty string

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Sun, 13 Sep 2020 12:48:02 UTC

Severity: minor

Tags: fixed

Found in version 26.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 43375 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Boruch Baum <boruch_baum <at> gmx.com>, 43375 <at> debbugs.gnu.org
Subject: Re: bug#43375: 26.1: file-directory-p returns t for empty string
Date: Sun, 13 Sep 2020 15:34:33 +0200
Andreas Schwab <schwab <at> linux-m68k.org> writes:

>> I was expecting the follow to return nil, but it returns t
>>
>>   (file-directory-p "")
>
> This is not a bug, as Emacs always works with expanded and canonicalized
> file names (the result of applying expand-file-name).

Yup.  It should be documented, though, so I've now mentioned this quirk
in the doc string in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 250 days ago.

Previous Next


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