Skip to content

Commit

Permalink
Adds folders to the file metadata passed to the outside "zipper" tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
landreev committed Sep 10, 2020
1 parent 331276a commit 06905ec
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import edu.harvard.iq.dataverse.privateurl.PrivateUrlServiceBean;
import edu.harvard.iq.dataverse.settings.SettingsServiceBean;
import edu.harvard.iq.dataverse.util.FileUtil;
import edu.harvard.iq.dataverse.util.StringUtil;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.ArrayList;
Expand Down Expand Up @@ -563,6 +564,10 @@ public void addFileToCustomZipJob(String key, DataFile dataFile, Timestamp times
fileName = dataFile.getFileMetadata().getLabel();
}
}

if (StringUtil.nonEmpty(dataFile.getFileMetadata().getDirectoryLabel())) {
fileName = dataFile.getFileMetadata().getDirectoryLabel() + "/" + fileName;
}

if (location != null && fileName != null) {
em.createNativeQuery("INSERT INTO CUSTOMZIPSERVICEREQUEST (KEY, STORAGELOCATION, FILENAME, ISSUETIME) VALUES ("
Expand Down

0 comments on commit 06905ec

Please sign in to comment.