Skip to content

Commit

Permalink
Merge branch '3921-S3-driver-off-3919' of github.com:IQSS/dataverse i…
Browse files Browse the repository at this point in the history
…nto 3921-S3-driver-off-3919
  • Loading branch information
bsilverstein95 committed Aug 15, 2017
2 parents 3c392bd + c3daebe commit 3c0f8dd
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/main/java/edu/harvard/iq/dataverse/dataaccess/S3AccessIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,16 @@ public void deleteAllAuxObjects() throws IOException {
}
multiObjectDeleteRequest.setKeys(keys);

logger.info("Trying to delete auxiliary files...");
try {
s3.deleteObjects(multiObjectDeleteRequest);
} catch (MultiObjectDeleteException e) {
logger.warning("S3AccessIO: Unable to delete auxilary objects" + e.getMessage());
throw new IOException("S3AccessIO: Failed to delete one or more auxiliary objects.");
if (keys.isEmpty()){
logger.warning("S3AccessIO: no auxiliary objects to delete..");
} else {
logger.info("Trying to delete auxiliary files...");
try {
s3.deleteObjects(multiObjectDeleteRequest);
} catch (MultiObjectDeleteException e) {
logger.warning("S3AccessIO: Unable to delete auxilary objects" + e.getMessage());
throw new IOException("S3AccessIO: Failed to delete one or more auxiliary objects.");
}
}
}

Expand Down

0 comments on commit 3c0f8dd

Please sign in to comment.