delete files used for deposit in tmp storage
This commit is contained in:
parent
749dbefc38
commit
66b2596036
|
@ -2126,7 +2126,10 @@ public class DataManagementPlanManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Files.deleteIfExists(supportingFilesZip.toPath());
|
if(supportingFilesZip != null) {
|
||||||
|
Files.deleteIfExists(supportingFilesZip.toPath());
|
||||||
|
}
|
||||||
|
Files.deleteIfExists(pdfFile.toPath());
|
||||||
Files.deleteIfExists(file.getFile().toPath());
|
Files.deleteIfExists(file.getFile().toPath());
|
||||||
|
|
||||||
return finalDoi;
|
return finalDoi;
|
||||||
|
@ -2189,6 +2192,7 @@ public class DataManagementPlanManager {
|
||||||
if(supportingFilesZip != null) {
|
if(supportingFilesZip != null) {
|
||||||
Files.deleteIfExists(supportingFilesZip.toPath());
|
Files.deleteIfExists(supportingFilesZip.toPath());
|
||||||
}
|
}
|
||||||
|
Files.deleteIfExists(pdfFile.toPath());
|
||||||
Files.deleteIfExists(file.getFile().toPath());
|
Files.deleteIfExists(file.getFile().toPath());
|
||||||
|
|
||||||
return doiModel;
|
return doiModel;
|
||||||
|
@ -2216,6 +2220,9 @@ public class DataManagementPlanManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
zout.close();
|
zout.close();
|
||||||
|
if(!hasFileUploaded){
|
||||||
|
Files.deleteIfExists(new File(this.environment.getProperty("temp.temp") + "supportingFiles.zip").toPath());
|
||||||
|
}
|
||||||
return hasFileUploaded ? new File(this.environment.getProperty("temp.temp") + "supportingFiles.zip") : null;
|
return hasFileUploaded ? new File(this.environment.getProperty("temp.temp") + "supportingFiles.zip") : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue