Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the absolute/relative path weirdness when setting up WASI-based runner filesystems #3704

Merged
merged 9 commits into from
Mar 24, 2023
Merged
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