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


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36490 <at> debbugs.gnu.org, erik_hahn <at> gmx.de
Subject: Re: bug#36490: 26.1;
 directory-files-recursively breaks when it encounters a directory
 named "~"
Date: Tue, 09 Jul 2019 18:50:44 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Any function that iterates over a list of directory files (as returned
>> by directory-files) would then have to quote whatever it passes to
>> expand-file-name -- or avoid that function completely.  That seems like
>> an odd design.
>
> What happens if a function that iterates over a directory finds a
> subdirectory whose name is literally "~"?

I think I must be missing something, because I don't think anything
special should happen?

(find-file "/tmp/~/foo")

works fine, for instance.  And

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

-- 
(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.