@Override byte[] backup(PatchingTaskContext context) throws IOException { final File[] repoRoots = context.getTargetModulePath(); final String moduleName = contentItem.getName(); final String slot = contentItem.getSlot(); for(final File path : repoRoots) { // Find the first module and calculate the hash final File modulePath = PatchContentLoader.getModulePath(path, moduleName, slot); final File moduleXml = new File(modulePath, MODULE_XML); if(moduleXml.exists()) { PatchLogger.ROOT_LOGGER.debugf("found in path (%s)", moduleXml.getAbsolutePath()); context.invalidateRoot(modulePath); return HashUtils.hashFile(modulePath); } } return notFound(contentItem); }
@Override byte[] backup(PatchingTaskContext context) throws IOException { final File[] repoRoots = context.getTargetModulePath(); final String moduleName = contentItem.getName(); final String slot = contentItem.getSlot(); for(final File path : repoRoots) { // Find the first module and calculate the hash final File modulePath = PatchContentLoader.getModulePath(path, moduleName, slot); final File moduleXml = new File(modulePath, MODULE_XML); if(moduleXml.exists()) { PatchLogger.ROOT_LOGGER.debugf("found in path (%s)", moduleXml.getAbsolutePath()); context.invalidateRoot(modulePath); return HashUtils.hashFile(modulePath); } } return notFound(contentItem); }