feat(tvix/castore/directory/traverse): use castore Paths
This switches from using std::path::Path to using castore paths. We can drop some error handling in descend_to, as absolute (or redundant) paths are not representable. We however now need to convert from a std::path::Path to our representation, and decide to accept .. canonicalization, as paths in EvalIO might contain this. Dealing .. to hop into another store path, if we encounter this, should be dealt with in a previous step. Change-Id: I5e94693808420c5d56587c68731252b54755bf93 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11575 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
This commit is contained in:
parent
4033d4c50f
commit
abc0553eb8
2 changed files with 17 additions and 52 deletions
|
|
@ -305,6 +305,9 @@ impl TvixStoreIO {
|
|||
};
|
||||
|
||||
// now with the root_node and sub_path, descend to the node requested.
|
||||
// We convert sub_path to the castore model here.
|
||||
let sub_path = tvix_castore::PathBuf::from_host_path(sub_path, true)?;
|
||||
|
||||
directoryservice::descend_to(&self.directory_service, root_node, sub_path)
|
||||
.await
|
||||
.map_err(|e| std::io::Error::new(io::ErrorKind::Other, e))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue