sbt/util-cache
bitloi 840887820c
[2.x] fix: Fix FileAlreadyExistsException in packageDirectory (#9047)
**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)
2026-04-13 04:30:45 -04:00
..
src [2.x] fix: Fix FileAlreadyExistsException in packageDirectory (#9047) 2026-04-13 04:30:45 -04:00
NOTICE Adds overrides for File-based caching 2017-04-17 10:24:54 -04:00