GNU bug report logs - #36490
26.1; directory-files-recursively breaks when it encounters a directory named "~"

Previous Next

Package: emacs;

Reported by: Erik Hahn <erik_hahn <at> gmx.de>

Date: Wed, 3 Jul 2019 18:09:01 UTC

Severity: minor

Tags: confirmed, fixed

Found in version 26.1

Fixed in version 27.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: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Erik Hahn <erik_hahn <at> gmx.de>
Cc: 36490 <at> debbugs.gnu.org
Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~"
Date: Mon, 08 Jul 2019 22:59:37 +0200
Erik Hahn <erik_hahn <at> gmx.de> writes:

> Call (directory-files-recursively DIR ".*") where DIR contains a
> subdirectory named "~" but is not the parent of your home directory. The
> function will recurse into your home directory. This is probably because
> (expand-file-name "~" ...) returns the home directory.

Oops:

(expand-file-name "~" "/tmp/")
=> "/home/larsi"

Yup; that function should be rewritten to have no instances of
`expand-file-name', which is too DWIM for a function like this.  I'll do
a rewrite...

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




This bug report was last modified 5 years and 315 days ago.

Previous Next


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