Skip to content

Commit b4deb6e

Browse files
committed
Fix compatibility with updated CacheUtils method signatures
Update CacheUtils.zip() and CacheUtils.unzip() call sites to include the preservePermissions boolean parameter that was added in the master branch for Unix permission preservation support. This fixes compilation errors that occur when the PR is rebased onto current master.
1 parent a6607d6 commit b4deb6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ private void restoreDirectoryArtifact(File cachedZip, Artifact artifact, Path re
374374
if (!Files.exists(restorationPath)) {
375375
Files.createDirectories(restorationPath);
376376
}
377-
CacheUtils.unzip(cachedZip.toPath(), restorationPath);
377+
CacheUtils.unzip(cachedZip.toPath(), restorationPath, cacheConfig.isPreservePermissions());
378378
LOGGER.debug("Restored directory artifact by unzipping: {} -> {}", artifact.getFileName(), restorationPath);
379379
}
380380

@@ -702,7 +702,7 @@ private void saveDirectoryArtifact(
702702
File originalFile)
703703
throws IOException {
704704
Path tempZip = Files.createTempFile("maven-cache-", "-" + project.getArtifactId() + ".zip");
705-
boolean hasFiles = CacheUtils.zip(originalFile.toPath(), tempZip, "*");
705+
boolean hasFiles = CacheUtils.zip(originalFile.toPath(), tempZip, "*", cacheConfig.isPreservePermissions());
706706
if (hasFiles) {
707707
// Temporarily replace artifact file with zip for saving
708708
projectArtifact.setFile(tempZip.toFile());

0 commit comments

Comments
 (0)