Changeset 5794


Ignore:
Timestamp:
2003-11-07T10:41:07+13:00 (20 years ago)
Author:
kjdon
Message:

small changes for saving a non-gatherer collection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/msm/MetadataSetManager.java

    r5785 r5794  
    943943    // Create the correct file to save these sets to...
    944944    File file = new File(Gatherer.self.getCollectionMetadata());
     945    if (!file.exists()) {
     946        Gatherer.println("trying to save a collection and the metadata directory does not exist - creating it!");
     947        file.mkdir();
     948    }
    945949    // And make back ups of all existing metadata set files.
    946950    File temp[] = file.listFiles();
     
    995999    public final boolean searchForMetadata(FileNode destination, FileNode source, boolean folder_level, boolean dummy_run) {
    9961000        ///atherer.println("MetadataSetManager.searchForMetadata()");
    997     return loader.searchForMetadata(destination, source, folder_level, dummy_run);
     1001    // for some reason, the loader returns 'dialog_cancelled' ie true if cancelled, false if OK. why???
     1002    // since we want to return true if successful, we'll return the opposite
     1003    return (loader.searchForMetadata(destination, source, folder_level, dummy_run)?false:true);
    9981004    }
    9991005    /** Build a vector of all the metadata sets that contain an element with the given name.
Note: See TracChangeset for help on using the changeset viewer.