Serialize resource pack snapshots with AstraPlus asset exports
This commit is contained in:
@@ -72,6 +72,14 @@ public final class PackBuilder {
|
||||
}
|
||||
|
||||
private int writeArchive(Path contents, Path target, String resourceVersion) throws IOException {
|
||||
// Shared with server-side exporters (AstraPlus). A build must see one complete asset generation.
|
||||
String lock = "AstraPacks:contents:" + contents.toAbsolutePath().normalize().toString().toLowerCase(java.util.Locale.ROOT);
|
||||
synchronized (lock.intern()) {
|
||||
return writeLockedArchive(contents, target, resourceVersion);
|
||||
}
|
||||
}
|
||||
|
||||
private int writeLockedArchive(Path contents, Path target, String resourceVersion) throws IOException {
|
||||
int files = 0;
|
||||
long totalBytes = 0;
|
||||
try (var paths = Files.walk(contents);
|
||||
|
||||
Reference in New Issue
Block a user