Skip to content

Commit

Permalink
Merge pull request #3704 from wasmerio/relative-vs-absolute-paths
Browse files Browse the repository at this point in the history
Fix the absolute/relative path weirdness when setting up WASI-based runner filesystems
  • Loading branch information
Michael Bryan authored Mar 24, 2023
2 parents c9743a0 + 0114fdd commit 20085ec
Show file tree
Hide file tree
Showing 89 changed files with 933 additions and 417 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/vfs/src/host_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ mod tests {
"creating `b.txt`",
);

let readdir = fs.read_dir(&temp.path());
let readdir = fs.read_dir(temp.path());

assert!(
readdir.is_ok(),
Expand Down
8 changes: 5 additions & 3 deletions lib/vfs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ mod overlay_fs;
pub mod pipe;
#[cfg(feature = "static-fs")]
pub mod static_fs;
mod trace_fs;
#[cfg(feature = "webc-fs")]
pub mod webc_fs;

Expand All @@ -54,6 +55,7 @@ pub use passthru_fs::*;
pub use pipe::*;
pub use special_file::*;
pub use tmp_fs::*;
pub use trace_fs::TraceFileSystem;
pub use union_fs::*;
pub use zero_file::*;

Expand Down Expand Up @@ -535,7 +537,7 @@ impl ReadDir {
}
}

#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DirEntry {
pub path: PathBuf,
// weird hack, to fix this we probably need an internal trait object or callbacks or something
Expand Down Expand Up @@ -565,7 +567,7 @@ impl DirEntry {
}

#[allow(clippy::len_without_is_empty)] // Clippy thinks it's an iterator.
#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug, Default, PartialEq, Eq)]
// TODO: review this, proper solution would probably use a trait object internally
pub struct Metadata {
pub ft: FileType,
Expand Down Expand Up @@ -605,7 +607,7 @@ impl Metadata {
}
}

#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug, Default, PartialEq, Eq)]
// TODO: review this, proper solution would probably use a trait object internally
pub struct FileType {
pub dir: bool,
Expand Down
Loading

0 comments on commit 20085ec

Please sign in to comment.