mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
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:
parent
4b761f97a3
commit
15c3f06938
1 changed files with 2 additions and 1 deletions
|
@ -31,9 +31,10 @@
|
|||
|
||||
- public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String directoryName) throws IOException, ContentValidationException {
|
||||
- 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
|
||||
+ 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()) {
|
||||
throw new ContentValidationException(path, list);
|
||||
|
|
Loading…
Reference in a new issue