Ignore:
Timestamp:
2005-07-13T16:18:25+12:00 (19 years ago)
Author:
mdewsnip
Message:

Tidied up FileManager.java in preparation for updating collections on the server immediately when building collections remotely.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r10007 r10245  
    158158
    159159
     160    private int countFolderDepth(File file)
     161    {
     162    int depth = 0;
     163    while (file != null) {
     164        depth++;
     165        file = file.getParentFile();
     166    }
     167    return depth;
     168    }
     169
     170
    160171    /** Format the given filename path string so that it is no longer than the given width. If it is wider replace starting directories with ...
    161172     * @param key The key <strong>String</Strong> used to retrieve a phrase from the dictionary for this item.
     
    241252            int max_folder_depth = Configuration.getInt("general.max_folder_depth", Configuration.COLLECTION_SPECIFIC);
    242253            boolean continue_over_depth = false;
    243             if(FileManager.countFolderDepth(source_file) > max_folder_depth) {
     254            if (countFolderDepth(source_file) > max_folder_depth) {
    244255                Object[] options = { Dictionary.get("General.Yes"), Dictionary.get("General.No"), Dictionary.get("FileActions.Increase_Depth") };
    245256                String args[] = { String.valueOf(max_folder_depth), source_file.getAbsolutePath() };
Note: See TracChangeset for help on using the changeset viewer.