Files
neovim/runtime/doc
tao fa9b3381bc feat(path): fnamemodify(':h') preserves logical root #40447
Problem:
On Windows, `fnamemodify('//foo/C$', ':h')` incorrectly removes `C$`
as a regular file name and returns `//foo`. However, this is a valid
UNC path, `foo` is a server name and `C$` is a share name.
The correct result should be `//foo/C$`.

Solution:
Extend `os_fileinfo2` and `FileInfo` with `prefix_off`, `rest_off` to
identify path types and logical root boundaries. ':h' can use this info
to prevent traversing past the logical root.

Examples:
  /foo               => /
  //foo              => // (POSIX)
  //foo/bar          => //foo (POSIX)
  //server/share/foo => //server/share/ (Windows)
  C:/foo             => C:/
  //?/C:/foo         => //?/C:/

Co-authored-by: Barrett Ruth <br@barrettruth.com>
2026-07-01 08:25:21 -04:00
..
2026-06-29 13:10:31 -04:00
2026-06-29 23:22:52 +02:00
2026-02-12 13:46:45 +01:00
2024-05-15 23:19:26 +02:00
2026-04-29 17:37:47 -04:00
2026-06-29 13:10:31 -04:00
2026-05-07 10:36:55 +02:00
2026-06-29 13:10:31 -04:00
2025-12-06 20:33:02 -05:00
2023-06-25 17:14:28 +02:00
2026-06-29 13:10:31 -04:00
2026-04-18 15:38:59 -04:00
2026-01-27 17:14:57 -05:00
2026-06-29 13:10:31 -04:00
2026-07-01 13:00:06 +02:00
2025-12-15 13:55:15 -05:00
2026-03-16 10:29:58 +01:00
2026-04-16 10:48:11 -04:00
2025-09-28 20:57:59 -07:00
2026-05-07 10:36:55 +02:00
2026-05-07 10:36:48 +02:00
2026-05-14 13:13:30 -04:00
2026-07-01 13:26:21 +02:00
2025-12-15 13:55:15 -05:00
2026-03-22 01:57:28 +01:00
2026-04-22 18:25:07 -04:00
2026-05-17 10:02:12 -04:00
2026-06-11 13:35:19 +02:00
2026-03-24 00:14:55 +01:00
2026-05-07 10:36:48 +02:00
2026-05-07 10:36:48 +02:00
2026-06-29 13:10:31 -04:00
2026-06-29 13:10:31 -04:00
2026-06-29 13:10:31 -04:00
2026-06-29 13:10:31 -04:00