Changeset 5836


Ignore:
Timestamp:
2003-11-13T14:37:58+13:00 (20 years ago)
Author:
kjdon
Message:

searchForMEtadata(file) now returns true if successful, not true if cancelled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r5796 r5836  
    13601360    }
    13611361
    1362      private boolean searchForMetadata(File current_file) {
    1363        boolean cancelled = false;
     1362    /** now this returns true if successful, false if unsuccessful or cancelled */
     1363    private boolean searchForMetadata(File current_file) {
     1364    boolean success = true;
    13641365       if(current_file.isFile() && current_file.getName().equals(Utility.METADATA_XML)) {
    1365            cancelled = collection.msm.searchForMetadata(null, new FileNode(current_file), false, true); // A dummy run only.
     1366           success = collection.msm.searchForMetadata(null, new FileNode(current_file), false, true); // A dummy run only.
    13661367       }
    13671368       else {
    13681369           File[] children_files = current_file.listFiles();
    1369            for(int i = 0; !cancelled && children_files != null && i < children_files.length; i++) {
    1370                cancelled = searchForMetadata(children_files[i]);
     1370           for(int i = 0; success && children_files != null && i < children_files.length; i++) {
     1371               success = searchForMetadata(children_files[i]);
    13711372           }
    13721373       }
    1373        return cancelled;
     1374       return success;
    13741375     }
    13751376
Note: See TracChangeset for help on using the changeset viewer.