Files
sbt/util-cache
Anatolii Kmetiukandbitloi 743fe18f46 [2.x] fix: Fix FileAlreadyExistsException in packageDirectory (#9315)
**Problem**
Intermittent java.nio.file.FileAlreadyExistsException when publishing
classes.sbtdir.zip during action-cache packaging under parallel tasks
(#9043). Copying from a temp directory straight into the final path races
on the fixed destination name.

**Solution**
Stage the built zip next to the destination with a unique temp file, then
replace the final path via Files.move with REPLACE_EXISTING and ATOMIC_MOVE,
falling back to a non-atomic move when needed. Add a concurrent
packageDirectory test.

Closes #9043

Generated-by: Cursor (AI-assisted)

Co-authored-by: bitloi <[email protected]>
2026-06-08 23:37:56 -04:00
..
2017-04-17 10:24:54 -04:00