Skip to content

Commit

Permalink
overlay builder should only create and delete its internal builds dir…
Browse files Browse the repository at this point in the history
…, not its parent
  • Loading branch information
trxcllnt committed Jan 26, 2025
1 parent eb43859 commit 2ba68dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bin/sccache-dist/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,16 @@ impl OverlayBuilder {
);
}

let dir = dir.join("builds");

// TODO: pidfile
let ret = Self {
bubblewrap,
dir,
job_queue,
};
ret.cleanup().await?;
fs::create_dir_all(&ret.dir).context("Failed to create base directory for builder")?;
fs::create_dir_all(ret.dir.join("builds"))
.context("Failed to create builder builds directory")?;
fs::create_dir_all(&ret.dir).context("Failed to create builder builds directory")?;
Ok(ret)
}

Expand All @@ -181,7 +181,7 @@ impl OverlayBuilder {
job_id: &str,
toolchain_dir: &Path,
) -> Result<OverlaySpec> {
let build_dir = self.dir.join("builds").join(job_id);
let build_dir = self.dir.join(job_id);

tracing::trace!(
"[prepare_overlay_dirs({job_id})]: Creating build directory: {build_dir:?}"
Expand Down

0 comments on commit 2ba68dc

Please sign in to comment.