Improve zip file recognition.

Look for world/level.dat because some zip file generators do not include
entries for directories by themselves.
Dieser Commit ist enthalten in:
Rusty Burchfield 2011-12-25 14:15:33 -08:00 committet von zml2008
Ursprung 05125c496e
Commit 72b2c90c19

Datei anzeigen

@ -132,7 +132,8 @@ public class Snapshot implements Comparable<Snapshot> {
try {
if (file.getName().toLowerCase().endsWith(".zip")) {
ZipFile entry = new ZipFile(file);
return entry.getEntry(worldname) != null;
return (entry.getEntry(worldname) != null
|| entry.getEntry(worldname + "/level.dat") != null);
} else if (file.getName().toLowerCase().endsWith(".tar.bz2")
|| file.getName().toLowerCase().endsWith(".tar.gz")
|| file.getName().toLowerCase().endsWith(".tar")) {