Fix for map parser zipping.
This commit is contained in:
parent
6ae35f1b37
commit
39b2ad57be
@ -71,7 +71,7 @@ public class ZipUtil
|
||||
entry = new ZipEntry(file);
|
||||
zipOutputStream.putNextEntry(entry);
|
||||
|
||||
fileInputStream = new FileInputStream(file);
|
||||
fileInputStream = new FileInputStream(sourceFolder + File.separator + file);
|
||||
|
||||
int len;
|
||||
while ((len = fileInputStream.read(buffer)) > 0)
|
||||
|
@ -79,19 +79,19 @@ public class WorldManager
|
||||
{
|
||||
if (file.getName().equalsIgnoreCase("level.dat"))
|
||||
{
|
||||
fileList.add(file.getName());
|
||||
fileList.add(world.getName() + File.separator + file.getName());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file.getName().equalsIgnoreCase("region"))
|
||||
{
|
||||
dirList.add(file.getName());
|
||||
dirList.add(world.getName() + File.separator + file.getName());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file.getName().equalsIgnoreCase("WorldConfig.dat"))
|
||||
{
|
||||
fileList.add(file.getName());
|
||||
fileList.add(world.getName() + File.separator + file.getName());
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ public class WorldManager
|
||||
//System.out.println("Path A: " + Paths.get("").toAbsolutePath().toString());
|
||||
//System.out.println("Path B: " + Paths.get("").toAbsolutePath().toString() + File.separator + world.getName() + File.separator);
|
||||
|
||||
ZipUtil.ZipFolders(Paths.get("").toAbsolutePath().toString(), world.getName() + ".zip", dirList, fileList);
|
||||
ZipUtil.ZipFolders(Paths.get(world.getName()).toAbsolutePath().toString(), world.getName() + ".zip", dirList, fileList);
|
||||
|
||||
try
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user