Ignore:
Timestamp:
2010-08-24T19:49:00+12:00 (14 years ago)
Author:
ak19
Message:

More changes for ticket 152: making the collectdir moveable. When using server.exe, if GLI was last shutdown when another collectdir was active, this needs to be read in from the user config.xml by GLI, and server.exe needs to use it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r22691 r22771  
    708708    }
    709709
    710     /** Returns the path of the Greenstone "collect" directory. */
     710    /** Returns the path of the current collect directory. */
    711711    static public String getCollectDirectoryPath()
    712712    {
     
    714714        return non_standard_collect_directory_path;
    715715    }
    716 
    717     if (!GS3) {
    718         return Configuration.gsdl_path + "collect" + File.separator;
    719     }
    720     else {
    721         return getSitesDirectoryPath() + Configuration.site_name + File.separator + "collect" + File.separator;
    722     }
    723     }
    724 
     716   
     717    return getDefaultGSCollectDirectoryPath();
     718   
     719    }
     720
     721    /** Returns the path of the Greenstone "collect" directory. */
     722    static public String getDefaultGSCollectDirectoryPath() {
     723        if (!GS3) {
     724            return Configuration.gsdl_path + "collect" + File.separator;
     725        }
     726        else {
     727            return getSitesDirectoryPath() + Configuration.site_name + File.separator + "collect" + File.separator;
     728        }
     729    }   
    725730
    726731    /** Returns the path of the GLI directory. */
     
    833838    // non-destructive update of gsdl(3)site.cfg (comments preserved)
    834839    String collectDir = Gatherer.getCollectDirectoryPath();
     840    //collectDir = "\"" + collectDir.substring(0, collectDir.length()-1) + "\""; // remove file separator at end   
    835841    collectDir = collectDir.substring(0, collectDir.length()-1); // remove file separator at end   
    836842    Utility.updatePropertyConfigFile(gsdlsitecfg, "collecthome", collectDir);
Note: See TracChangeset for help on using the changeset viewer.