WebAssembly / WebAssembly/WASI

How should `..` paths be resolved?

Open
#768 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

On POSIX, path resolution is performed one component at a time, and .. is resolved only after resolving all components that came before it. Opening a path such as nonexistent/.. fails, because opening nonexistent first fails.

On Windows, path resolution has an up-front parsing step which resolves ... On nonexistent/.., it's resolved to . first, so opening it succeeds.

Should we require Windows implementations to emulate POSIX semantics here, or say that whether .. is resolved up front or on the fly is nondeterministic?

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 issue discussion and compare the described POSIX and Windows path-resolution behavior for nonexistent/... The work is done when the WASI behavior is decided and the specification clearly states whether implementations must follow one semantic or may resolve .. nondeterministically.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Feature
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.