diff --git a/dspace-api/src/main/java/org/dspace/app/itemexport/ItemExport.java b/dspace-api/src/main/java/org/dspace/app/itemexport/ItemExport.java index aaa4eea07a..791f7ef200 100644 --- a/dspace-api/src/main/java/org/dspace/app/itemexport/ItemExport.java +++ b/dspace-api/src/main/java/org/dspace/app/itemexport/ItemExport.java @@ -486,7 +486,14 @@ public class ItemExport { // written while (!isDone) { - File fout = new File(destDir, myName); + if (myName.contains(File.separator)) + { + String dirs = myName.substring(0, myName.lastIndexOf(File.separator)); + File fdirs = new File(destDir + File.separator + dirs); + fdirs.mkdirs(); + } + + File fout = new File(destDir, myName); if (fout.createNewFile()) { FileOutputStream fos = new FileOutputStream(fout); @@ -874,8 +881,6 @@ public class ItemExport { * * @param fileName * name of the file to get the size - * @param eperson - * the eperson requesting file * @return * @throws Exception */ @@ -1051,9 +1056,8 @@ public class ItemExport { * email for the from field * @param ccMail - * carbon copy email - * @param fileName - - * the file name to be downloaded. It is added to the url in the - * email + * @param error - + * the error message * @throws MessagingException */ public static void emailErrorMessage(String toMail, String fromMail, diff --git a/dspace/CHANGES b/dspace/CHANGES index 53b74cf3e6..d444663efa 100644 --- a/dspace/CHANGES +++ b/dspace/CHANGES @@ -10,6 +10,7 @@ - Fix for SF bug [2495728] 'My Account' disappears following exports - Update XMLUI Google Analytics code to match latest tracking code - Fix for SF bug [1606439] Exception handling for deleting a metadata field + - [2513300] Fix for bug [1774958] Nested folders do not export correctly (Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini) - [2057378] Hierarchical LDAP support