3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 11:00:04 +01:00

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.

(cherry picked from commit dcfb769d96)
Dieser Commit ist enthalten in:
wizjany 2019-04-06 13:22:20 -04:00 committet von MattBDev
Ursprung bf684d478e
Commit 3ffa54af84

Datei anzeigen

@ -93,11 +93,11 @@ public class TrueZipMcRegionChunkStore extends McRegionChunkStore {
} else { } else {
Pattern pattern = Pattern.compile(".*\\.mc[ra]$"); Pattern pattern = Pattern.compile(".*\\.mc[ra]$");
// World pattern // World pattern
Pattern worldPattern = Pattern.compile(worldName + "\\$"); Pattern worldPattern = Pattern.compile(worldName + "[\\\\/].*");
for (Enumeration<? extends ZipEntry> e = zip.entries(); e.hasMoreElements(); ) { for (Enumeration<? extends ZipEntry> e = zip.entries(); e.hasMoreElements(); ) {
ZipEntry testEntry = e.nextElement(); ZipEntry testEntry = e.nextElement();
// Check for world // Check for world
if (worldPattern.matcher(worldName).matches()) { if (worldPattern.matcher(testEntry.getName()).matches()) {
// Check for file // Check for file
if (pattern.matcher(testEntry.getName()).matches()) { if (pattern.matcher(testEntry.getName()).matches()) {
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf('/')); folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf('/'));