confict
This commit is contained in:
@@ -70,7 +70,7 @@ public class TmpDatasetService {
|
|||||||
throw new IOException("No symlinks created.");
|
throw new IOException("No symlinks created.");
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("tmp dataset created: {}, symlinksMade={}", tmp, linksMade);
|
log.info("tmp dataset created: {}, linksMade={}", tmp, linksMade);
|
||||||
}
|
}
|
||||||
|
|
||||||
private long link(Path tmp, String type, String part, String fullPath) throws IOException {
|
private long link(Path tmp, String type, String part, String fullPath) throws IOException {
|
||||||
@@ -92,28 +92,12 @@ public class TmpDatasetService {
|
|||||||
Files.delete(dst);
|
Files.delete(dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
Files.createSymbolicLink(dst, src);
|
||||||
Files.createLink(dst, src);
|
log.info("symlink created: {} -> {}", dst, src);
|
||||||
log.info("hardlink created: {} -> {}", dst, src);
|
|
||||||
} catch (FileSystemException e) {
|
|
||||||
if (e.getMessage() != null && e.getMessage().contains("Invalid cross-device link")) {
|
|
||||||
log.warn(
|
|
||||||
"Hardlink failed due to cross-device link. Fallback to symlink. src={}, dst={}",
|
|
||||||
src,
|
|
||||||
dst);
|
|
||||||
Files.createSymbolicLink(dst, src);
|
|
||||||
} else {
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String safe(String s) {
|
|
||||||
return (s == null || s.isBlank()) ? null : s.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* request 전체 폴더 link
|
* request 전체 폴더 link
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user