< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DiagnosticsOutputDirectory.java

Print this page

        

@@ -146,11 +146,12 @@
                     zos.setLevel(Deflater.BEST_COMPRESSION);
                     Files.walkFileTree(dir, Collections.emptySet(), Integer.MAX_VALUE, new SimpleFileVisitor<Path>() {
                         @Override
                         public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
                             if (attrs.isRegularFile()) {
-                                ZipEntry ze = new ZipEntry(file.toString());
+                                String name = dir.relativize(file).toString();
+                                ZipEntry ze = new ZipEntry(name);
                                 zos.putNextEntry(ze);
                                 zos.write(Files.readAllBytes(file));
                                 zos.closeEntry();
                             }
                             toDelete.add(file);
< prev index next >