mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
patch updates: jbr is optional only for linux without jbr bundled.
IDEA-CR-45018 GitOrigin-RevId: 85a864297273a1182de214fafa11dbec9ca5a84f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d59b63b6be
commit
e3ee646e5f
@@ -349,14 +349,9 @@ public class Patch {
|
||||
return new PatchFileCreator.ApplicationResult(false, appliedActions, t);
|
||||
}
|
||||
|
||||
File jre64 = new File(toDir.getAbsolutePath() + "/jre64");
|
||||
File jbr = new File(toDir.getAbsolutePath() + "/jbr");
|
||||
if (jbr.exists()) Runner.logger().info("jbr bundled: " + jbr.getAbsolutePath());
|
||||
if (jre64.exists()) Runner.logger().info("jre64 bundled: " + jre64.getAbsolutePath());
|
||||
for (File directory : createdDirectories) {
|
||||
File[] children = directory.listFiles();
|
||||
if (children != null && pruningEmptyDir(toDir, directory, jre64, jbr) &&
|
||||
createdOptionalFiles.containsAll(Arrays.asList(children))) {
|
||||
if (children != null && createdOptionalFiles.containsAll(Arrays.asList(children))) {
|
||||
Runner.logger().info("Pruning empty directory: " + directory);
|
||||
try {
|
||||
Utils.delete(directory);
|
||||
@@ -378,13 +373,6 @@ public class Patch {
|
||||
return new PatchFileCreator.ApplicationResult(true, appliedActions);
|
||||
}
|
||||
|
||||
private boolean pruningEmptyDir(File toDir, File directory, File jre64, File jbr) {
|
||||
return ((!directory.getAbsolutePath().contains("jre64") ||
|
||||
(directory.getAbsolutePath().contains("jre64") && !jre64.exists())) &&
|
||||
(!directory.getAbsolutePath().contains("jbr") ||
|
||||
(directory.getAbsolutePath().contains("jbr") && !jbr.exists())));
|
||||
}
|
||||
|
||||
public void revert(List<? extends PatchAction> actions, File backupDir, File rootDir, UpdaterUI ui) throws IOException {
|
||||
Runner.logger().info("Reverting... [" + actions.size() + " actions]");
|
||||
ui.startProcess("Reverting...");
|
||||
|
||||
Reference in New Issue
Block a user