Skip to content
Closed
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
12 changes: 9 additions & 3 deletions crates/wasi/src/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,9 +920,15 @@ impl Dir {
return Err(ErrorCode::Invalid);
}
let new_dir_handle = Arc::clone(&new_dir.dir);
self.run_blocking(move |d| d.hard_link(&old_path, &new_dir_handle, &new_path))
.await?;
Ok(())
match self
.run_blocking(move |d| d.hard_link(&old_path, &new_dir_handle, &new_path))
.await
{
#[cfg(windows)]
Err(ErrorCode::Access) => Err(ErrorCode::NotPermitted),
Ok(()) => Ok(()),
Err(err) => Err(err.into()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this into() redundant?
Looking at L928 it appears that the err is already ErrorCode?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard_link appears to return err as std::io::Error. In any case that is what the compiler thinks :)

}
}

pub(crate) async fn open_at(
Expand Down