Skip to content

Commit 9a53d8a

Browse files
committed
clear formats when exporttime is null
1 parent 210a6f1 commit 9a53d8a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/main/java/edu/harvard/iq/dataverse/export/ExportService.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ public InputStream getExport(DatasetVersion datasetVersion, String formatName) t
219219
if (exportInputStream != null) {
220220
return exportInputStream;
221221
}
222-
222+
// If the date was reset, any existing cached entries are invalid and need to be cleared
223+
if(lastExportDate == null) {
224+
clearAllCachedFormats(dataset);
225+
}
223226
// if it doesn't exist, we'll try to run the export:
224227
exportFormat(dataset, formatName);
225228

@@ -466,7 +469,7 @@ private void clearCachedExport(Dataset dataset, String format) throws IOExceptio
466469
}
467470

468471
// This method checks if the metadata has already been exported in this
469-
// format and cached on disk. If it has, it'll open the file and retun
472+
// format and cached on disk. If it has, it'll open the file and return
470473
// the file input stream. If not, it'll return null.
471474
private InputStream getCachedExportFormat(Dataset dataset, String formatName) throws ExportException, IOException {
472475

0 commit comments

Comments
 (0)