Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-1042

Item Import - errors when no contents file and metadata_*.xml

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7.2
    • Fix Version/s: 1.8.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Not Required

      Description

      ItemImport.java

      String[] dirListing = new File(path).list();
      for (String fileName : dirListing)
      {
      if (!"dublin_core.xml".equals(fileName) && !filename.equals("handle") && !filename.startsWith("metadata_"))

      { throw new FileNotFoundException("No contents file found"); }

      }

      System.out.println("No contents file found - but only metadata files found. Assuming metadata only.");

      The second and third conditionals in the if statement should use 'fileName' rather than 'filename'

        Attachments

          Activity

            People

            • Assignee:
              stuartlewis Stuart Lewis
              Reporter:
              stuartlewis Stuart Lewis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: