--- a/src/Tools/Setup/isabelle/setup/Build.java Thu Jul 08 22:17:20 2021 +0200
+++ b/src/Tools/Setup/isabelle/setup/Build.java Thu Jul 08 22:21:31 2021 +0200
@@ -193,11 +193,13 @@
boolean is_file = Files.isRegularFile(path);
if (is_dir || is_file) {
String name = Environment.slashes(dir.relativize(path).toString());
- JarEntry entry = new JarEntry(is_dir ? name + "/" : name);
- entry.setTime(path.toFile().lastModified());
- out.putNextEntry(entry);
- if (is_file) { out.write(Files.readAllBytes(path)); }
- out.closeEntry();
+ if (!name.isEmpty()) {
+ JarEntry entry = new JarEntry(is_dir ? name + "/" : name);
+ entry.setTime(path.toFile().lastModified());
+ out.putNextEntry(entry);
+ if (is_file) { out.write(Files.readAllBytes(path)); }
+ out.closeEntry();
+ }
}
}
}