Skip to content

Commit 5dcc2da

Browse files
committed
Fix unzip on empty file
For some reason unzip on a empty zip leads to a non zero return code. Adding a placeholder file fixes the issue.
1 parent 6e2f64b commit 5dcc2da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/moe/gradle/remote/ServerFileUploader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ protected void main() {
6969
env.put("create", "true");
7070
try (FileSystem zipFile = FileSystems.newFileSystem(URI.create(zipPath.toUri().toString().replace("file://", "jar:file:")), env)) {
7171
list.walk(new Zipper(zipFile));
72+
Files.createFile(zipFile.getPath("/.placeholder"));
7273
}
7374

7475
String serverPath = Server.getRemotePath(server.getTempDir(), zipPath.getFileName());

0 commit comments

Comments
 (0)