Skip to content

Commit

Permalink
Merge #2667
Browse files Browse the repository at this point in the history
2667: Fix error code for path_rename of a non-existant file r=ptitSeb a=Amanieu

Fixes #2534

Co-authored-by: Amanieu d'Antras <[email protected]>
Co-authored-by: ptitSeb <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2021
2 parents 4406f59 + 7294f68 commit 4529b03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wasi/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@ pub fn path_rename(

let source_entry = match &mut state.fs.inodes[source_parent_inode].kind {
Kind::Dir { entries, .. } => {
wasi_try!(entries.remove(&source_entry_name), __WASI_EINVAL)
wasi_try!(entries.remove(&source_entry_name), __WASI_ENOENT)
}
Kind::Root { .. } => return __WASI_ENOTCAPABLE,
Kind::Symlink { .. } | Kind::File { .. } | Kind::Buffer { .. } => {
Expand Down

0 comments on commit 4529b03

Please sign in to comment.