From efd3e5266aa7b4bb27881dd62ad939288fab73da Mon Sep 17 00:00:00 2001 From: "Vladimir.Orlov" Date: Mon, 27 Feb 2017 15:26:43 +0300 Subject: [PATCH] Patches: skip update action for files which do not have root folder. Example: patch for jre(jre64) which can be absent (not installed). --- updater/src/com/intellij/updater/Patch.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/updater/src/com/intellij/updater/Patch.java b/updater/src/com/intellij/updater/Patch.java index a366b2e216bd..c326a024e738 100644 --- a/updater/src/com/intellij/updater/Patch.java +++ b/updater/src/com/intellij/updater/Patch.java @@ -321,6 +321,10 @@ public class Patch { if ((action instanceof CreateAction) && !new File(toDir, action.getPath()).getParentFile().exists()) { Runner.logger().info("Create action: " + action.getPath() + " skipped. The parent folder is absent."); + } + else if ((action instanceof UpdateAction) && + !new File(toDir, action.getPath()).getParentFile().exists()) { + Runner.logger().info("Update action: " + action.getPath() + " skipped. The parent folder is absent."); } else { appliedActions.add(action); action.apply(patchFile, backupDir, toDir);