fix: read a typed folder the same in both modes

Line mode dropped quotes only when both ends had one, so a half-selected
paste made a folder whose name starts with a quote. The screen's reader
is now the only one: any quote at either end goes, variables expand
before ~.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 06:04:39 +01:00
1 parent ee2e6e80ce
commit 8c74f3f0bc
7 files changed
+27 -31

No files matched your search

+3 -1
View File
@@ -2218,7 +2218,9 @@ class TestManualPlatformPrompt(unittest.TestCase):
folder named `"` under the current directory, and the run said Done."""
root = Path(_tempdir(self))
for typed in (f'"{root}/My Card/bios"', f"'{root}/My Card/bios'",
f' "{root}/My Card/bios" '):
f' "{root}/My Card/bios" ',
# A half-selected copy: line mode kept the quote.
f'"{root}/My Card/bios'):
answers = iter(["1", typed])
with self.subTest(typed=typed), \
unittest.mock.patch("builtins.input",