From c22545b469ee7e3d9569576d8df15d2de83edac4 Mon Sep 17 00:00:00 2001 From: qqmyers Date: Tue, 10 Jan 2023 15:45:46 -0500 Subject: [PATCH] Only do physcal delete when deleteFileId has been set --- .../iq/dataverse/datasetutility/AddReplaceFileHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/datasetutility/AddReplaceFileHelper.java b/src/main/java/edu/harvard/iq/dataverse/datasetutility/AddReplaceFileHelper.java index ad03bcd550a..1d0ec0f19d9 100644 --- a/src/main/java/edu/harvard/iq/dataverse/datasetutility/AddReplaceFileHelper.java +++ b/src/main/java/edu/harvard/iq/dataverse/datasetutility/AddReplaceFileHelper.java @@ -1666,7 +1666,7 @@ private boolean step_070_run_update_dataset_command() { } } - if (isFileReplaceOperation() && !multifile) { + if (isFileReplaceOperation() && deleteFileId!=-1 && !multifile) { // Finalize the delete of the physical file // (File service will double-check that the datafile no // longer exists in the database, before proceeding to