diff options
author | Florian Klink <flokli@flokli.de> | 2024-05-05T08·08+0300 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2024-05-05T14·54+0000 |
commit | 281bd46a43437c02435a67239c47994b7636ba66 (patch) | |
tree | fbb11d65015fc6de6240a500a64eaa11e26be742 /tvix/castore/src/import/archive.rs | |
parent | 08feea4817a5827db478d4202e58290d547f8cde (diff) |
feat(tvix-castore/import) have IngestionEntry.path() return &Path r/8076
There's no need for this to be a &PathBuf. Change-Id: I2d4126d57cfd8ddaad5dd327943b70b83d45c749 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11589 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
Diffstat (limited to 'tvix/castore/src/import/archive.rs')
-rw-r--r-- | tvix/castore/src/import/archive.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/castore/src/import/archive.rs b/tvix/castore/src/import/archive.rs index 0d21481d40e7..0ebb4a236117 100644 --- a/tvix/castore/src/import/archive.rs +++ b/tvix/castore/src/import/archive.rs @@ -288,12 +288,12 @@ impl IngestionEntryGraph { None => self.graph.add_node(entry), }; - // A path with 1 component is the root node + // for archives, a path with 1 component is the root node if path.components().count() == 1 { // We expect archives to contain a single root node, if there is another root node // entry with a different path name, this is unsupported. if let Some(root_node) = self.root_node { - if self.get_node(root_node).path() != &path { + if self.get_node(root_node).path() != path.as_ref() { return Err(Error::UnexpectedNumberOfTopLevelEntries); } } |