Subject: bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~"

From: Eli Zaretskii <[email-masked]>
Date: Tue, 09 Jul 2019 19:44:31 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Tue, 09 Jul 2019 18:27:28 +0200
> 
> > No, I think the problem is that the caller should have protected the
> > literal "~", as I said.
> 
> 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 "~"?