Merge branch 'fix/hardlink_FileAlreadyExistsException' into 'master'

fix FileAlreadyExistsException during archive copy

See merge request sheepitrenderfarm/client!245
This commit is contained in:
Laurent Clouet
2024-07-13 12:11:01 +00:00

View File

@@ -81,6 +81,7 @@ public class DirectoryManager {
} }
try { try {
Files.deleteIfExists(targetArchivePath); // createLink only works if the target does not exist
try { try {
Files.createLink(targetArchivePath, existingArchivePath); Files.createLink(targetArchivePath, existingArchivePath);
log.debug("Created hardlink from " + targetArchivePath + " to " + existingArchivePath); log.debug("Created hardlink from " + targetArchivePath + " to " + existingArchivePath);