Add skipping world symlink scan
In worlds that are extremely large (greater than 1TB), it can take an insanely long time to walk the entire world for symlinks. This patch adds a system property to disable the symlink scan, which can be used to speed up world loading.
This commit is contained in:
@@ -31,9 +31,10 @@
|
|||||||
|
|
||||||
- public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String directoryName) throws IOException, ContentValidationException {
|
- public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String directoryName) throws IOException, ContentValidationException {
|
||||||
- Path path = this.getLevelPath(directoryName);
|
- Path path = this.getLevelPath(directoryName);
|
||||||
|
- List<ForbiddenSymlinkInfo> list = this.worldDirValidator.validateDirectory(path, true);
|
||||||
+ public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String s, ResourceKey<LevelStem> dimensionType) throws IOException, ContentValidationException { // CraftBukkit
|
+ public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String s, ResourceKey<LevelStem> dimensionType) throws IOException, ContentValidationException { // CraftBukkit
|
||||||
+ Path path = this.getLevelPath(s);
|
+ Path path = this.getLevelPath(s);
|
||||||
List<ForbiddenSymlinkInfo> list = this.worldDirValidator.validateDirectory(path, true);
|
+ List<ForbiddenSymlinkInfo> list = Boolean.getBoolean("paper.disableWorldSymlinkValidation") ? List.of() : this.worldDirValidator.validateDirectory(path, true); // Paper - add skipping of symlinks scan
|
||||||
|
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
throw new ContentValidationException(path, list);
|
throw new ContentValidationException(path, list);
|
||||||
|
|||||||
Reference in New Issue
Block a user