mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 10:30:44 +01:00
fix backslash problem with jar files
This commit is contained in:
@@ -1519,12 +1519,7 @@ public class JavaBuild {
|
||||
int offset = sketch.getFolder().getAbsolutePath().length() + 1;
|
||||
for (String path : dataFiles) {
|
||||
if (Base.isWindows()) {
|
||||
System.out.println("base is windows");
|
||||
//dataFiles[i] = dataFiles[i].replace('\\', '/');
|
||||
path = path.replace('\\', '/');
|
||||
System.out.println("new path is " + path);
|
||||
} else {
|
||||
System.out.println("base NOT windows");
|
||||
}
|
||||
//File dataFile = new File(dataFiles[i]);
|
||||
File dataFile = new File(path);
|
||||
@@ -1532,8 +1527,7 @@ public class JavaBuild {
|
||||
// don't export hidden files
|
||||
// skipping dot prefix removes all: . .. .DS_Store
|
||||
if (dataFile.getName().charAt(0) != '.') {
|
||||
//ZipEntry entry = new ZipEntry(dataFiles[i].substring(offset));
|
||||
ZipEntry entry = new ZipEntry(dataFile.getAbsolutePath().substring(offset));
|
||||
ZipEntry entry = new ZipEntry(path.substring(offset));
|
||||
zos.putNextEntry(entry);
|
||||
zos.write(Base.loadBytesRaw(dataFile));
|
||||
zos.closeEntry();
|
||||
|
||||
Reference in New Issue
Block a user