WASI icon indicating copy to clipboard operation
WASI copied to clipboard

How should `..` paths be resolved?

Open sunfishcode opened this issue 4 years ago • 5 comments

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?

sunfishcode avatar Mar 10 '21 14:03 sunfishcode