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 #32 received at 43375 <at> debbugs.gnu.org (full text, mbox):

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: schwab <at> linux-m68k.org, 43375 <at> debbugs.gnu.org
Subject: Re: bug#43375: 26.1: file-directory-p returns t for empty string
Date: Sun, 13 Sep 2020 12:29:00 -0400
On 2020-09-13 18:01, Eli Zaretskii wrote:
> > Date: Sun, 13 Sep 2020 10:39:43 -0400
> > From: Boruch Baum <boruch_baum <at> gmx.com>
> > Cc: 43375 <at> debbugs.gnu.org
> >
> > > >   (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).
> >
> > Then the docstring could be clearer and say "Return t if the expansion
> > of FILENAME names an existing directory"
>
> That's not a useful doc string, because "expansion of FILENAME" is not
> well defined, and is not easy to describe.
>
> I'm okay with making the doc string more clear, but let's please think
> about a more useful amendment.  A doc string should help the user
> understand what will/did happen, it shouldn't present puzzles.

How about:

  Return t if evaluating `expand-file-name' on FILENAME names an existing
  directory.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




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

Previous Next


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