Fix for map parser zipping.

This commit is contained in:
Jonathan Williams 2014-07-08 12:37:39 -07:00
parent 6ae35f1b37
commit 39b2ad57be
2 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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
{