Skip to content

Commit

Permalink
return EIO if internal data structures are corrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMcCaskey committed May 15, 2019
1 parent 8a99e5c commit c402c03
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/wasi/src/syscalls/mod.rs
Expand Up @@ -1424,12 +1424,10 @@ pub fn path_open(
}

let mut cur_dir_inode = working_dir.inode;
let mut cumulative_path = std::path::PathBuf::from(
state
.fs
.get_base_path_for_directory(working_dir.inode)
.expect("TODO"),
);
let mut cumulative_path = std::path::PathBuf::from(wasi_try!(state
.fs
.get_base_path_for_directory(working_dir.inode)
.ok_or(__WASI_EIO)));

// traverse path
if path_vec.len() > 1 {
Expand Down

0 comments on commit c402c03

Please sign in to comment.