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


View this message in rfc822 format

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 43375 <at> debbugs.gnu.org
Subject: bug#43375: 26.1: file-directory-p returns t for empty string
Date: Sun, 13 Sep 2020 17:56:48 +0200
On Sep 13 2020, Boruch Baum wrote:

> Then the docstring could be clearer and say "Return t if the expansion
> of FILENAME names an existing directory" instead of simply the current
> "Return t if FILENAME names an existing directory". Would that be an
> acceptable change?

This is already documented in the Elisp manual:

       Many of the file functions take one or more arguments that are file
    names.  A file name is a string.  Most of these functions expand file
    name arguments using the function ‘expand-file-name’, so that ‘~’ is
    handled correctly, as are relative file names (including ‘../’ and the
    empty string).  *Note File Name Expansion::.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




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.