[2513300] Fix for bug [1774958] Nested folders do not export correctly

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3374 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Stuart Lewis
2009-01-18 21:35:22 +00:00
parent 0654064bd8
commit f9061c2d9f
2 changed files with 11 additions and 6 deletions

View File

@@ -486,7 +486,14 @@ public class ItemExport {
// written // written
while (!isDone) { 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()) { if (fout.createNewFile()) {
FileOutputStream fos = new FileOutputStream(fout); FileOutputStream fos = new FileOutputStream(fout);
@@ -874,8 +881,6 @@ public class ItemExport {
* *
* @param fileName * @param fileName
* name of the file to get the size * name of the file to get the size
* @param eperson
* the eperson requesting file
* @return * @return
* @throws Exception * @throws Exception
*/ */
@@ -1051,9 +1056,8 @@ public class ItemExport {
* email for the from field * email for the from field
* @param ccMail - * @param ccMail -
* carbon copy email * carbon copy email
* @param fileName - * @param error -
* the file name to be downloaded. It is added to the url in the * the error message
* email
* @throws MessagingException * @throws MessagingException
*/ */
public static void emailErrorMessage(String toMail, String fromMail, public static void emailErrorMessage(String toMail, String fromMail,

View File

@@ -10,6 +10,7 @@
- Fix for SF bug [2495728] 'My Account' disappears following exports - Fix for SF bug [2495728] 'My Account' disappears following exports
- Update XMLUI Google Analytics code to match latest tracking code - Update XMLUI Google Analytics code to match latest tracking code
- Fix for SF bug [1606439] Exception handling for deleting a metadata field - 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) (Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini)
- [2057378] Hierarchical LDAP support - [2057378] Hierarchical LDAP support