Skip to content

Commit

Permalink
Fixed wrong path in modpack zip on Linux/Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghongxun committed Mar 11, 2016
1 parent c839d04 commit 156de24
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,18 @@ private void putDirectoryImpl(File source, String basePath, BiFunction<String, B
if (file.isDirectory()) {
pathName = file.getPath().substring(basePath.length() + 1)
+ "/";
pathName = pathName.replace('\\', '/');
if (pathNameCallback != null)
pathName = pathNameCallback.apply(pathName, true);
if (pathName == null)
continue;
zos.putNextEntry(new ZipEntry(pathName));
putDirectoryImpl(file, basePath, pathNameCallback);
} else {
if (".DS_Store".equals(file.getName())) // For mac computers.
if (".DS_Store".equals(file.getName())) // For Mac computers.
continue;
pathName = file.getPath().substring(basePath.length() + 1);
pathName = pathName.replace('\\', '/');
if (pathNameCallback != null)
pathName = pathNameCallback.apply(pathName, false);
if (pathName == null)
Expand Down

0 comments on commit 156de24

Please sign in to comment.