Skip to content

Commit

Permalink
Fix size calc bug b/f revert sync zip download #4000
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-a-dunlap committed Sep 4, 2018
1 parent ac38d3b commit 9023b1f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/edu/harvard/iq/dataverse/api/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,11 @@ public Response datafiles(@PathParam("fileIds") String fileIds, @QueryParam("gb
throw new IOException("Invalid file size or accessObject when checking limits of zip file");
}

sizeTotal += size;

} else {
size = file.getFilesize();
}
if (sizeTotal + size < zipDownloadSizeLimit) {
sizeTotal += file.getFilesize();
sizeTotal += size;
zipFileList.add(file);
} else {
partialResult = true;
Expand Down

0 comments on commit 9023b1f

Please sign in to comment.