Use new API ArchiveOutputStream.createArchiveEntry(Path, String,
LinkOption...).
@@ -71,7 +71,7 @@ private FileVisitResult visit(final Path path, final BasicFileAttributes attrs,
Objects.requireNonNull(attrs);
final String name = directory.relativize(path).toString().replace('\\', '/');
if (!name.isEmpty()) {
- final ArchiveEntry archiveEntry = target.createArchiveEntry(path.toFile(),
+ final ArchiveEntry archiveEntry = target.createArchiveEntry(path,
isFile || name.endsWith("/") ? name : name + "/");
target.putArchiveEntry(archiveEntry);
if (isFile) {
