Skip to content

Commit

Permalink
Fixed root folder not beeing found
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Jun 10, 2022
1 parent 752ee82 commit b7b03d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/wasi/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,9 @@ impl WasiFs {

let path: &Path = Path::new(path);
let mut cur_inode = self.get_fd_inode(base)?;
if path.to_str().unwrap() == "/" && base == VIRTUAL_ROOT_FD {
return Ok(cur_inode);
}
let n_components = path.components().count();

// If this is the start of the path search and it starts with the
Expand Down

0 comments on commit b7b03d0

Please sign in to comment.