Subject: 29.0.60; Strange file completion candidates for shadowed file paths

From: Daniel Mendler <[email-masked]>
Date: Thu, 22 Dec 2022 21:57:39 +0100

1. Start emacs -Q
2. C-x C-f
3. Delete the entire minibuffer input
4. Enter /etc//s
5. Press ?

You will see candidates like etc//sbin/. The candidates can get even
stranger. If you enter /etc//etc//etc/s then you will get candidates
like etc//etc//etc//sbin/. I can reproduce this bug on 27 and 29. I
haven't tried 28, but the issue should exist there too.

In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0, Xaw scroll bars) of 2022-12-11 built on projects
Repository revision: f221105723dc8d3ee9f3c8d1c2717058afbc6666
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)