Merge branch 'fix/hardlink_FileAlreadyExistsException' into 'master'
fix FileAlreadyExistsException during archive copy See merge request sheepitrenderfarm/client!245
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user