You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Reading and saving filenames with whitespace targets another file #29313
Call projects.readFile with that workspace's cwd and relativePath: "report.txt ".
Call projects.writeFile with the same path and contents: "edited".
Read both files directly from disk. Repeat with " report.txt" (one leading space).
These are service/RPC reproductions; no file-tree or editor interaction is needed.
Expected behavior
The read returns whitespace file. The save changes only the explicitly requested whitespace filename, leaving report.txt unchanged.
Actual behavior
The read returns ordinary file. Saving overwrites report.txt, while the requested whitespace file retains its old contents.
ProjectReadFileInput/ProjectWriteFileInput and their success results trim the path during serialization. WorkspacePaths.resolveRelativePathWithinRoot and WorkspaceFileSystem.resolveReadTarget also trim it, so direct service calls reproduce the problem too.
Environment and version
Reproduced on Linux, Node v26.12.1, upstream main at 47f2c8d. Leading/trailing whitespace is valid in POSIX filenames; Windows has different filename restrictions.
Runtime evidence
A standalone run against the actual file service, with a temporary workspace and the read/write RPC codecs:
Activity