diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/DatasetServiceBean.java index 706fa5ade01..226579e6143 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetServiceBean.java @@ -883,7 +883,10 @@ public long findStorageSize(Dataset dataset, boolean countCachedExtras) throws I if (!countCachedExtras) { if (datafile.isTabularData()) { // count the size of the stored original, in addition to the main tab-delimited file: - total += datafile.getDataTable().getOriginalFileSize(); + Long originalFileSize = datafile.getDataTable().getOriginalFileSize(); + if (originalFileSize != null) { + total += originalFileSize; + } } } else { StorageIO storageIO = datafile.getStorageIO();