Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "make path_create_directory return error if no dir was created" #4720

Merged
merged 2 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions lib/wasix/src/syscalls/wasi/path_create_directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ pub(crate) fn path_create_directory_internal(
return Err(Errno::Inval);
}

let mut created_dir = false;
let mut cur_dir_inode = working_dir.inode;
for comp in &path_vec {
let processing_cur_dir_inode = cur_dir_inode.clone();
Expand Down Expand Up @@ -126,7 +125,6 @@ pub(crate) fn path_create_directory_internal(
return Err(Errno::Notdir);
}
} else {
created_dir = true;
state.fs_create_dir(&adjusted_path)?;
}
let kind = Kind::Dir {
Expand Down Expand Up @@ -162,9 +160,5 @@ pub(crate) fn path_create_directory_internal(
}
}

if created_dir {
Ok(())
} else {
Err(Errno::Exist)
}
Ok(())
}
2 changes: 1 addition & 1 deletion tests/wasi-fyi/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bash build.sh
status=0

# Define skip list as an array
SKIP_LIST=()
SKIP_LIST=("fs_create_dir-existing-directory.wasm")

# List and process .foo files
for file in *.wasm; do
Expand Down
Loading