mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2024-11-27 06:10:08 +08:00
Fixed wrong path in modpack zip on Linux/Mac
This commit is contained in:
parent
c839d045cc
commit
156de2457d
@ -93,6 +93,7 @@ public class ZipEngine {
|
||||
if (file.isDirectory()) {
|
||||
pathName = file.getPath().substring(basePath.length() + 1)
|
||||
+ "/";
|
||||
pathName = pathName.replace('\\', '/');
|
||||
if (pathNameCallback != null)
|
||||
pathName = pathNameCallback.apply(pathName, true);
|
||||
if (pathName == null)
|
||||
@ -100,9 +101,10 @@ public class ZipEngine {
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user