Workdir config
All checks were successful
CI / Typos (push) Successful in 23s
CI / Build and test (push) Successful in 1m53s
CI / Clippy (push) Successful in 4m4s
Docker / build-and-push (push) Successful in 4m28s
CI / Build and test (all features) (push) Successful in 7m2s

This commit is contained in:
2026-03-26 19:31:40 -07:00
parent 80f4ebdbe6
commit 47a0adbaff
10 changed files with 45 additions and 20 deletions

View File

@@ -102,8 +102,6 @@ impl Datasets {
let config = ConfigToml {
dataset: DatasetConfig {
name: Label::new("virtual-dataset").unwrap(),
working_dir: None,
source: [(
Self::virt_source(),
Source::Filesystem {
@@ -155,7 +153,10 @@ impl Datasets {
});
}
pub async fn open(config: impl Into<PathBuf>) -> Result<Self, std::io::Error> {
pub async fn open(
config: impl Into<PathBuf>,
working_dir_root: impl Into<PathBuf>,
) -> Result<Self, std::io::Error> {
let path_config = config.into();
let path_parent = path_config
.parent()
@@ -184,12 +185,7 @@ impl Datasets {
}
};
let path_workdir = config
.dataset
.working_dir
.clone()
.unwrap_or(path_parent.join(".pile"))
.join(config.dataset.name.as_str());
let path_workdir = working_dir_root.into().join(config.dataset.name.as_str());
let mut sources = HashMap::new();
let mut disabled_sources = HashMap::new();