mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-14 20:31:37 +01:00
Allow skipping of world symlink validation (#11250)
This commit is contained in:
parent
8ffc76800a
commit
d0fb407064
@ -64,4 +64,5 @@ Oliwier Miodun <naczs@blueflow.pl>
|
||||
aerulion <aerulion@gmail.com>
|
||||
Lukas Planz <lukas.planz@web.de>
|
||||
granny <contact@granny.dev>
|
||||
mja00 <me@mja00.dev>
|
||||
```
|
||||
|
21
patches/server/Add-skipping-world-symlink-scan.patch
Normal file
21
patches/server/Add-skipping-world-symlink-scan.patch
Normal file
@ -0,0 +1,21 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: mja00 <me@mja00.dev>
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java
|
||||
@@ -0,0 +0,0 @@ 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);
|
Loading…
Reference in New Issue
Block a user