diff options
| author | tao <2471314@gmail.com> | 2026-06-10 19:46:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-10 07:46:55 -0400 |
| commit | 7bf2ab4b87e08807ca9fa1901ac915427428a928 (patch) | |
| tree | 22950ac4bfd50bbd0f5533713cfb6d13c2f1af70 /runtime/lua/vim | |
| parent | 61380c5e0abc202e727df020a9d26684934f504e (diff) | |
| download | rneovim-7bf2ab4b87e08807ca9fa1901ac915427428a928.tar.gz rneovim-7bf2ab4b87e08807ca9fa1901ac915427428a928.tar.bz2 rneovim-7bf2ab4b87e08807ca9fa1901ac915427428a928.zip | |
fix(path): `nvim_get_runtime_file` fails on DOS 8.3 filename #40144
Problem:
stdpath() may return a DOS 8.3 "shortened" filename, because Windows
truncates some long usernames into `6ch~N` names. Then features such
as `nvim_get_runtime_file` fail to find the file.
Analysis:
When expanding an 8.3 filename path like `C:/Users/ADMINI~1/AppData/*`,
we treat `~` as a special character and first check whether a directory
named `ADMINI~1` exists under `Users`. Since no such directory actually
exists, the expansion fails.
Solution:
Treat `~` as a literal character in `do_path_expand`. Since the `~/`
case is already handled in `gen_expand_wildcards`, any remaining `~` is
just a literal character and will later be escaped to `\~` by
`file_pat_to_reg_pat` if needed.
Diffstat (limited to 'runtime/lua/vim')
0 files changed, 0 insertions, 0 deletions