Create more missing directories.

This commit is contained in:
Bill Thiede 2022-12-03 22:39:04 -08:00
parent 4ca427121c
commit b6f696e40c

View File

@ -103,28 +103,37 @@ fn bench_at_commit(
fn reload(config: &State<Config>, repo: &str) -> Result<String, SyncError> {
info!("Need to reload '{}': {:?}", repo, config);
let source_path = config.source_root.join(repo);
let build_path = config.build_root.join("git").join(repo);
let target_path = config.build_root.join("target").join(repo);
let commits_root = config.build_root.join("commits");
let git_root = config.build_root.join("git");
let www_root = config.www_root.join(repo);
let target_root = config.build_root.join("target");
let source_path = config.source_root.join(repo);
let build_path = git_root.join(repo);
let target_path = target_root.join(repo);
dbg!(
&source_path,
&build_path,
&target_path,
&commits_root,
&git_root,
&www_root
);
if !build_path.exists() {
info!("Creating {}", build_path.display());
fs::create_dir_all(&build_path)?;
}
if !commits_root.exists() {
info!("Creating {}", commits_root.display());
fs::create_dir_all(&commits_root)?;
}
if !git_root.exists() {
info!("Creating {}", git_root.display());
fs::create_dir_all(&git_root)?;
}
if !target_root.exists() {
info!("Creating {}", target_root.display());
fs::create_dir_all(&target_root)?;
}
if !www_root.exists() {
info!("Creating {}", www_root.display());
fs::create_dir_all(&www_root)?;