Patches: skip update action for files which do not have root folder.

Example: patch for jre(jre64) which can be absent (not installed).
This commit is contained in:
Vladimir.Orlov
2017-02-27 15:26:43 +03:00
parent 16e2a4af17
commit efd3e5266a
@@ -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);