From 5f24e1d2d9e59d9c48d8dc957e11383410c80706 Mon Sep 17 00:00:00 2001 From: "vijaya.boddipudi" <216913149+vijaya-boddipudi@users.noreply.github.com> Date: Mon, 24 Aug 2026 18:35:04 +0530 Subject: [PATCH] Fix compile error in Main.java: rename entryDest to newFile PR #35 (codeql zipslip Task 5) renamed the local extract-path variable to 'newFile' but left the executable-bit block in extractArchive() referencing the old 'entryDest' name, breaking the perc-distribution-tree compile: Main.java:[283,23] cannot find symbol symbol: variable entryDest Replace 'entryDest.toFile()' with the in-scope 'newFile' (also drops the redundant .toFile() since newFile is already a File). Also wraps two Spotless-flagged // codeql comments that exceeded the 120-char limit. --- .../src/main/java/com/percussion/preinstall/Main.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/perc-distribution-tree/src/main/java/com/percussion/preinstall/Main.java b/modules/perc-distribution-tree/src/main/java/com/percussion/preinstall/Main.java index 197edbd6ec..3e023d76cc 100644 --- a/modules/perc-distribution-tree/src/main/java/com/percussion/preinstall/Main.java +++ b/modules/perc-distribution-tree/src/main/java/com/percussion/preinstall/Main.java @@ -266,19 +266,21 @@ public static void extractArchive(Path archiveFile, Path destPath, String folder new File(newFile.getParent()).mkdirs(); if (entry.isDirectory()) { - // codeql[java/zipslip] justification: ZipSlipGuard + canonical startsWith; re-review by 2027-07-31 + // codeql[java/zipslip] justification: ZipSlipGuard + canonical startsWith; re-review by + // 2027-07-31 Files.createDirectory(newFile.toPath()); continue; } System.out.println("Creating file " + newFile); - // codeql[java/zipslip] justification: ZipSlipGuard + canonical startsWith; re-review by 2027-07-31 + // codeql[java/zipslip] justification: ZipSlipGuard + canonical startsWith; re-review by + // 2027-07-31 Files.copy(archive.getInputStream(entry), newFile.toPath()); // Preserve executable permissions for shell scripts if (entryName.endsWith(".sh")) { - File file = entryDest.toFile(); + File file = newFile; file.setExecutable(true, false); // Set executable for owner, group, and others } }