Permalink
Browse files

#577 minor fix for windows users using the map tile packager that cau…

…sed the generation of zip files with an empty named sub folder
  • Loading branch information...
spyhunter99 committed Apr 5, 2017
1 parent f16bfa0 commit e40c25e5361326af6380a01411d6137ce7992abb
Showing with 4 additions and 1 deletion.
  1. +4 −1 OSMMapTilePackager/src/main/java/org/osmdroid/mtp/util/FolderZipper.java
@@ -65,7 +65,10 @@ private static void addFolderToZip(final File folder, final ZipOutputStream zip,
addFolderToZip(file, zip, baseName);
} else {
/* Otherwise zip it as usual. */
final String name = file.getPath().substring(baseName.length());
String name = file.getPath().substring(baseName.length());
if (name.startsWith(File.separator))
name = name.substring(1);
System.out.println(name + " added");
final ZipEntry zipEntry = new ZipEntry(name);
zip.putNextEntry(zipEntry);
final FileInputStream fileIn = new FileInputStream(file);

0 comments on commit e40c25e

Please sign in to comment.