mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Improve zip file recognition.
Look for world/level.dat because some zip file generators do not include entries for directories by themselves.
This commit is contained in:
parent
05125c496e
commit
72b2c90c19
@ -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")) {
|
||||
|
Loading…
Reference in New Issue
Block a user