Problem
ktsu.Semantics.Paths validates paths against Windows rules regardless of the host OS. On Linux and macOS, RelativeFilePath.TryCreate:
- rejects
<, > and |, which are the only characters in ASCII 1–127 it refuses, and all three are legal in POSIX file names;
- rejects any path of 257 or more characters (
256: True, 257: False), although Linux PATH_MAX is 4096.
A consumer that wraps paths reported by the file system or by git therefore cannot represent real files. Git reports x|y.txt or a deep path on Linux, and the semantic type refuses it.
Ask
Apply the Windows reserved-character and MAX_PATH rules only when running on Windows. On POSIX, reject only what the platform rejects (NUL, and / inside a single segment).
Downstream
Once this ships, GitIntegration will add tests that send x|y.txt, a<b>.txt and a path over 260 characters through Status(), Diff() and Patch().
Problem
ktsu.Semantics.Pathsvalidates paths against Windows rules regardless of the host OS. On Linux and macOS,RelativeFilePath.TryCreate:<,>and|, which are the only characters in ASCII 1–127 it refuses, and all three are legal in POSIX file names;256: True,257: False), although LinuxPATH_MAXis 4096.A consumer that wraps paths reported by the file system or by git therefore cannot represent real files. Git reports
x|y.txtor a deep path on Linux, and the semantic type refuses it.Ask
Apply the Windows reserved-character and MAX_PATH rules only when running on Windows. On POSIX, reject only what the platform rejects (NUL, and
/inside a single segment).Downstream
<,>or|, or is longer than 256 characters (legal on Linux/macOS) GitIntegration#131: the maintainer decided to fix this upstream rather than add a git-specific path type.<,>or|in its name or a path over 256 characters FileDeduplicator#140 has the same root cause.PathTooLongExceptionon POSIX).Once this ships, GitIntegration will add tests that send
x|y.txt,a<b>.txtand a path over 260 characters throughStatus(),Diff()andPatch().