From fa69becf4d723c1549d8252eeabeb256423dbc19 Mon Sep 17 00:00:00 2001 From: Connor Brewster Date: Sat, 20 Apr 2024 09:19:05 -0500 Subject: refactor(tvix/castore): switch to `ingest_entries` for tarball ingestion With `ingest_entries` being more generalized, we can now use it for ingesting the directory entries generated from tarballs. Change-Id: Ie1f7a915c456045762e05fcc9af45771f121eb43 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11489 Reviewed-by: flokli Autosubmit: Connor Brewster Tested-by: BuildkiteCI --- tvix/castore/src/import/error.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tvix/castore/src/import/error.rs') diff --git a/tvix/castore/src/import/error.rs b/tvix/castore/src/import/error.rs index 18c71aa235b8..8cd4f95ffb52 100644 --- a/tvix/castore/src/import/error.rs +++ b/tvix/castore/src/import/error.rs @@ -1,6 +1,6 @@ use std::{fs::FileType, path::PathBuf}; -use crate::{proto::ValidateDirectoryError, Error as CastoreError}; +use crate::Error as CastoreError; #[derive(Debug, thiserror::Error)] pub enum Error { @@ -25,11 +25,14 @@ pub enum Error { #[error("unsupported file {0} type: {1:?}")] UnsupportedFileType(PathBuf, FileType), - #[error("invalid directory contents {0}: {1}")] - InvalidDirectory(PathBuf, ValidateDirectoryError), - #[error("unsupported tar entry {0} type: {1:?}")] UnsupportedTarEntry(PathBuf, tokio_tar::EntryType), + + #[error("symlink missing target {0}")] + MissingSymlinkTarget(PathBuf), + + #[error("unexpected number of top level directory entries")] + UnexpectedNumberOfTopLevelEntries, } impl From for Error { -- cgit 1.4.1