WebAssembly / WebAssembly/WASI

Clarify the behavior of `\` in a file name

Open
#708 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-filesystem
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

The spec says that / is the directory separator. Does this mean that \ is permissible in file names? Of course on Linux that's fine, but I would guess that it's not fine on Windows.

Generally speaking, I think that @sunfishcode's comment from way back when (https://github.com/WebAssembly/WASI/issues/775#issuecomment-962343948) regarding case sensitivity also applies here: the point is to allow access to people's files, so we can't forbid names that are allowed by the FS (at least for paths relative to a root); so we have to allow for \ being a part of a file name in Linux. What would be the expected behavior for foo\bar in Windows, would \ be a separator also?

It would be useful if the spec had some kind of canonical orientation language to let idiots like me 🤓 know what kinds of consistency is aimed at with wasi:filesystem, and what kinds of divergences are expected.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the filesystem specification language defining / as the directory separator and read @sunfishcode's linked comment on case sensitivity. Compare the expected treatment of \ in Linux and Windows, then clarify the specification's intended cross-platform consistency and behavior for names such as foo\bar.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
operating-systems
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.