Optimized the case when worlds were not in the root directory of a zip.

Dieser Commit ist enthalten in:
sk89q 2011-03-10 00:26:01 -08:00
Ursprung 7df2ae4e11
Commit 8017a346cb
4 geänderte Dateien mit 12 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -119,8 +119,9 @@ public class TrueZipLegacyChunkStore extends LegacyChunkStore {
// Whoo, found level.dat! // Whoo, found level.dat!
if (pattern.matcher(testEntry.getName()).matches()) { if (pattern.matcher(testEntry.getName()).matches()) {
file = testEntry.getName().replaceAll("level\\.dat$", "") folder = testEntry.getName().replaceAll("level\\.dat$", "");
+ file; folder = folder.substring(0, folder.length() - 1);
file = folder + file;
break; break;
} }
} }

Datei anzeigen

@ -116,8 +116,9 @@ public class TrueZipMcRegionChunkStore extends McRegionChunkStore {
// Whoo, found level.dat! // Whoo, found level.dat!
if (pattern.matcher(testEntry.getName()).matches()) { if (pattern.matcher(testEntry.getName()).matches()) {
file = testEntry.getName().replaceAll("level\\.dat$", "") folder = testEntry.getName().replaceAll("level\\.dat$", "");
+ file; folder = folder.substring(0, folder.length() - 1);
file = folder + file;
break; break;
} }
} }

Datei anzeigen

@ -116,8 +116,9 @@ public class ZippedLegacyChunkStore extends LegacyChunkStore {
// Whoo, found level.dat! // Whoo, found level.dat!
if (pattern.matcher(testEntry.getName()).matches()) { if (pattern.matcher(testEntry.getName()).matches()) {
file = testEntry.getName().replaceAll("level\\.dat$", "") folder = testEntry.getName().replaceAll("level\\.dat$", "");
+ file; folder = folder.substring(0, folder.length() - 1);
file = folder + file;
break; break;
} }
} }

Datei anzeigen

@ -113,8 +113,9 @@ public class ZippedMcRegionChunkStore extends McRegionChunkStore {
// Whoo, found level.dat! // Whoo, found level.dat!
if (pattern.matcher(testEntry.getName()).matches()) { if (pattern.matcher(testEntry.getName()).matches()) {
file = testEntry.getName().replaceAll("level\\.dat$", "") folder = testEntry.getName().replaceAll("level\\.dat$", "");
+ file; folder = folder.substring(0, folder.length() - 1);
file = folder + file;
break; break;
} }
} }