Fixed wrong path in modpack zip on Linux/Mac
This commit is contained in:
@@ -93,6 +93,7 @@ public class ZipEngine {
|
|||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
pathName = file.getPath().substring(basePath.length() + 1)
|
pathName = file.getPath().substring(basePath.length() + 1)
|
||||||
+ "/";
|
+ "/";
|
||||||
|
pathName = pathName.replace('\\', '/');
|
||||||
if (pathNameCallback != null)
|
if (pathNameCallback != null)
|
||||||
pathName = pathNameCallback.apply(pathName, true);
|
pathName = pathNameCallback.apply(pathName, true);
|
||||||
if (pathName == null)
|
if (pathName == null)
|
||||||
@@ -100,9 +101,10 @@ public class ZipEngine {
|
|||||||
zos.putNextEntry(new ZipEntry(pathName));
|
zos.putNextEntry(new ZipEntry(pathName));
|
||||||
putDirectoryImpl(file, basePath, pathNameCallback);
|
putDirectoryImpl(file, basePath, pathNameCallback);
|
||||||
} else {
|
} else {
|
||||||
if (".DS_Store".equals(file.getName())) // For mac computers.
|
if (".DS_Store".equals(file.getName())) // For Mac computers.
|
||||||
continue;
|
continue;
|
||||||
pathName = file.getPath().substring(basePath.length() + 1);
|
pathName = file.getPath().substring(basePath.length() + 1);
|
||||||
|
pathName = pathName.replace('\\', '/');
|
||||||
if (pathNameCallback != null)
|
if (pathNameCallback != null)
|
||||||
pathName = pathNameCallback.apply(pathName, false);
|
pathName = pathNameCallback.apply(pathName, false);
|
||||||
if (pathName == null)
|
if (pathName == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user