From dcfb769d96bc4524e098e7da11811d404d41c93c Mon Sep 17 00:00:00 2001 From: wizjany Date: Sat, 6 Apr 2019 13:22:20 -0400 Subject: [PATCH] Fix TrueZip region stores. I think. Someone tell me if this breaks their setup with truezip, but it works for me now and didn't before. I'm assuming people using .zip just used the normal zip store anyway. --- .../worldedit/world/storage/TrueZipMcRegionChunkStore.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/TrueZipMcRegionChunkStore.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/TrueZipMcRegionChunkStore.java index a22818c77..8d7c03e93 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/TrueZipMcRegionChunkStore.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/TrueZipMcRegionChunkStore.java @@ -93,11 +93,11 @@ public class TrueZipMcRegionChunkStore extends McRegionChunkStore { } else { Pattern pattern = Pattern.compile(".*\\.mc[ra]$"); // World pattern - Pattern worldPattern = Pattern.compile(worldName + "\\$"); + Pattern worldPattern = Pattern.compile(worldName + "[\\\\/].*"); for (Enumeration e = zip.entries(); e.hasMoreElements(); ) { ZipEntry testEntry = e.nextElement(); // Check for world - if (worldPattern.matcher(worldName).matches()) { + if (worldPattern.matcher(testEntry.getName()).matches()) { // Check for file if (pattern.matcher(testEntry.getName()).matches()) { folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf('/'));