Commit 156cafd9 authored by bourgesl's avatar bourgesl
Browse files

fixed remove() even if xml is not here

parent d4908125
......@@ -108,8 +108,6 @@ public final class RemovePipeline extends AbstractPipeline<PipelineCommonData> {
}
private boolean remove(final ProjectConfig projectConfig, final DoiStaging ds) throws IOException {
boolean changed = false;
final DoiService doiService = doiConfig.getDoiService();
final String doiSuffix = ds.getDoi().getIdentifier();
......@@ -119,21 +117,20 @@ public final class RemovePipeline extends AbstractPipeline<PipelineCommonData> {
if (!stagingDoiFile.exists()) {
logger.warn("Ignoring {} - missing xml at {}", doiSuffix, stagingDoiFile);
} else {
changed = true;
}
deleteFile(stagingDoiFile);
deleteFile(stagingDoiFile);
// remove landing pages in staging:
final File webDir = projectConfig.getWebStagingProjectDir();
final File webEmbedDir = projectConfig.getWebStagingProjectEmbedDir();
final File webXmlDir = projectConfig.getWebStagingProjectXmlDir();
// remove landing pages in staging:
final File webDir = projectConfig.getWebStagingProjectDir();
final File webEmbedDir = projectConfig.getWebStagingProjectEmbedDir();
final File webXmlDir = projectConfig.getWebStagingProjectXmlDir();
removeLandingPages(projectConfig, stagingDoiFile, webDir, webEmbedDir, webXmlDir);
removeLandingPages(projectConfig, stagingDoiFile, webDir, webEmbedDir, webXmlDir);
doiService.removeStagingDoiDatacite(doiSuffix);
}
return changed;
doiService.removeStagingDoiDatacite(doiSuffix);
return true;
}
private void removeLandingPages(final ProjectConfig projectConfig,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment