diff options
author | Mart <[email protected]> | 2024-08-16 16:36:30 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-16 22:36:30 +0200 |
commit | e619744fbdc4963eed0b04c1e44bd1089ce50285 (patch) | |
tree | 7e8170725832d92f96b94fa8f96a39a98cf1ed1f | |
parent | 534ab86010330ce3afa732910227585d0dc02d1e (diff) | |
download | Paper-e619744fbdc4963eed0b04c1e44bd1089ce50285.tar.gz Paper-e619744fbdc4963eed0b04c1e44bd1089ce50285.zip |
Allow skipping of world symlink validation (#11250)
-rw-r--r-- | LICENSE.md | 1 | ||||
-rw-r--r-- | patches/server/1047-Add-skipping-world-symlink-scan.patch | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/LICENSE.md b/LICENSE.md index 4cb1460c2e..704c1863a1 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -64,4 +64,5 @@ Oliwier Miodun <[email protected]> aerulion <[email protected]> Lukas Planz <[email protected]> granny <[email protected]> +mja00 <[email protected]> ``` diff --git a/patches/server/1047-Add-skipping-world-symlink-scan.patch b/patches/server/1047-Add-skipping-world-symlink-scan.patch new file mode 100644 index 0000000000..edbbf7edf8 --- /dev/null +++ b/patches/server/1047-Add-skipping-world-symlink-scan.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: mja00 <[email protected]> +Date: Mon, 12 Aug 2024 06:27:15 -0400 +Subject: [PATCH] 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. + +diff --git a/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java b/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java +index 427ee4d6f12a7abd8da0c65e0b9081b25824df40..85ba843ce7e1f62971e736fa2cc028c47b274ce4 100644 +--- a/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java ++++ b/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java +@@ -420,7 +420,7 @@ public class LevelStorageSource { + + 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); |