SW Remove Worldlock and Symlink Check
This commit is contained in:
@ -0,0 +1,72 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chaoscaot <chaos@chaoscaot.de>
|
||||||
|
Date: Wed, 25 Dec 2024 12:18:00 +0100
|
||||||
|
Subject: [PATCH] SW Remove Worldlock and Symlink Check
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/net/minecraft/world/level/storage/LevelStorageSource.java b/net/minecraft/world/level/storage/LevelStorageSource.java
|
||||||
|
index de43e54698125ce9f319d4889dd49f7029fe95e0..e21d744040bcf58b391f002f2dd1129e532ff1b6 100644
|
||||||
|
--- a/net/minecraft/world/level/storage/LevelStorageSource.java
|
||||||
|
+++ b/net/minecraft/world/level/storage/LevelStorageSource.java
|
||||||
|
@@ -343,7 +343,7 @@ public class LevelStorageSource {
|
||||||
|
|
||||||
|
public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String saveName, ResourceKey<LevelStem> dimensionType) throws IOException, ContentValidationException { // CraftBukkit
|
||||||
|
Path levelPath = this.getLevelPath(saveName);
|
||||||
|
- List<ForbiddenSymlinkInfo> list = Boolean.getBoolean("paper.disableWorldSymlinkValidation") ? List.of() : this.worldDirValidator.validateDirectory(levelPath, true); // Paper - add skipping of symlinks scan
|
||||||
|
+ List<ForbiddenSymlinkInfo> list = List.of(); // Paper - add skipping of symlinks scan
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
throw new ContentValidationException(levelPath, list);
|
||||||
|
} else {
|
||||||
|
@@ -420,7 +420,6 @@ public class LevelStorageSource {
|
||||||
|
}
|
||||||
|
|
||||||
|
public class LevelStorageAccess implements AutoCloseable {
|
||||||
|
- final DirectoryLock lock;
|
||||||
|
public final LevelStorageSource.LevelDirectory levelDirectory;
|
||||||
|
private final String levelId;
|
||||||
|
private final Map<LevelResource, Path> resources = Maps.newHashMap();
|
||||||
|
@@ -432,7 +431,6 @@ public class LevelStorageSource {
|
||||||
|
// CraftBukkit end
|
||||||
|
this.levelId = levelId;
|
||||||
|
this.levelDirectory = new LevelStorageSource.LevelDirectory(levelDir);
|
||||||
|
- this.lock = DirectoryLock.create(levelDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
public long estimateDiskSpace() {
|
||||||
|
@@ -476,9 +474,7 @@ public class LevelStorageSource {
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkLock() {
|
||||||
|
- if (!this.lock.isValid()) {
|
||||||
|
- throw new IllegalStateException("Lock is no longer valid");
|
||||||
|
- }
|
||||||
|
+ //nope
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlayerDataStorage createPlayerStorage() {
|
||||||
|
@@ -532,7 +528,7 @@ public class LevelStorageSource {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Optional<Path> getIconFile() {
|
||||||
|
- return !this.lock.isValid() ? Optional.empty() : Optional.of(this.levelDirectory.iconFile());
|
||||||
|
+ return Optional.of(this.levelDirectory.iconFile());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteLevel() throws IOException {
|
||||||
|
@@ -561,7 +557,6 @@ public class LevelStorageSource {
|
||||||
|
throw exception;
|
||||||
|
} else {
|
||||||
|
if (dir.equals(LevelStorageAccess.this.levelDirectory.path())) {
|
||||||
|
- LevelStorageAccess.this.lock.close();
|
||||||
|
Files.deleteIfExists(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -645,7 +640,7 @@ public class LevelStorageSource {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws IOException {
|
||||||
|
- this.lock.close();
|
||||||
|
+ //ignored
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean restoreLevelDataFromOld() {
|
||||||
11
steamwarci.yml
Normal file
11
steamwarci.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
build:
|
||||||
|
- "JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 ./gradlew applyPatches"
|
||||||
|
- "JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 ./gradlew createMojmapBundlerJar"
|
||||||
|
- "JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 ./gradlew --stop"
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
"/binarys/paper-1.21.4.jar": "paper-server/build/libs/paper-bundler-1.21.4-R0.1-SNAPSHOT-mojmap.jar"
|
||||||
|
"/binarys/spigot-1.21.4-inner.jar": "paper-server/build/libs/paper-server-1.21.4-R0.1-SNAPSHOT.jar"
|
||||||
|
|
||||||
|
release:
|
||||||
|
- "mvn deploy:deploy-file -DgroupId=de.steamwar -DartifactId=spigot -Dversion=1.21 -Dpackaging=jar -Dfile=paper-server/build/libs/paper-server-1.21.4-R0.1-SNAPSHOT.jar -Durl=file:///var/www/html/maven/"
|
||||||
Reference in New Issue
Block a user