Skip to content

wasip1 path_remove_directory fails with paths with trailing slashes #11524

@wingo

Description

@wingo

Test Case

For the wasi-testsuite test remove_directory_trailing_slashes, we mkdir dir.cleanup, then try to rrmdir dir.cleanup/ (note trailing slash). This fails because it uses the "get the parent then remove the leaf" strategy, and the parent of dir.cleanup/ is dir.cleanup, and the leaf is ..

A trace: WebAssembly/wasi-testsuite#101 (comment)

I would expect that the rmdir removes trailing slashes.

Filing this bug here as I am not sure if this is a failure of cap-std or if callers are required to remove trailing slashes already.

Versions and Environment

Wasmtime version or commit: 1a88c70 (august 19)

Metadata

Metadata

Assignees

Labels

bugIncorrect behavior in the current implementation that needs fixingwasiIssues pertaining to WASIwasi:implIssues pertaining to WASI implementation in Wasmtime

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions