bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36490: 26.1; directory-files-recursively breaks when it encounters a


From: Eli Zaretskii
Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~"
Date: Tue, 09 Jul 2019 19:52:52 +0300

> Date: Tue, 09 Jul 2019 19:44:31 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 36490@debbugs.gnu.org, erik_hahn@gmx.de
> 
> What happens if a function that iterates over a directory finds a
> subdirectory whose name is literally "~"?

Sorry, that's not what I meant to say.  I meant to say how would a
Lisp program know whether (expand-file-name "~/") means the home
directory or a directory whose name is literally "~"?

Btw, stuff like (expand-file-name "foo/~/") already does what you
want, so the problem is only with the leading '~', and can be avoided
if we avoid that situation.  IOW, why should this example:

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

determine how directory-files-recursively behaves?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]