Changeset 29514 for main/trunk/gli
- Timestamp:
- 2014-12-02T18:42:47+13:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r29361 r29514 205 205 206 206 // Users may specify a non-standard collect directory (eg. when running one GLI in a network environment) 207 if (go.collect_directory_path != null) { 208 setCollectDirectoryPath(go.collect_directory_path); 209 } 207 // Processing of custom non-standard collect directory passed into gli now happens in init() 208 //if (go.collect_directory_path != null) { setCollectDirectoryPath(go.collect_directory_path); } 210 209 211 210 // More special code for running with a remote Greenstone … … 236 235 go.local_library_path, go.library_url_string, 237 236 go.gliserver_url_string, go.debug, go.perl_path, go.no_load, go.filename, go.site_name, 238 go.servlet_path );237 go.servlet_path, go.collect_directory_path); 239 238 } 240 239 … … 245 244 String library_url_string, String gliserver_url_string, boolean debug_enabled, 246 245 String perl_path, boolean no_load, String open_collection, 247 String site_name, String servlet_path )246 String site_name, String servlet_path, String collect_directory_path) 248 247 { 249 248 if (gsdl3_path != null && !gsdl3_path.equals("")) { … … 580 579 Classifiers.loadClassifiersList(null); 581 580 Plugins.loadPluginsList(null); 581 582 // Users may specify a non-standard collect directory (eg. when running one GLI in a network environment) 583 // Set to any custom collection directory provided to gli. This happens if gli was run as: 584 // ./gli.sh -collectdir </full/path/to/custom/collect> 585 if(collect_directory_path != null) { 586 587 // create a version of the collect_dir_path without a file-separator at end 588 String collectDir = collect_directory_path; 589 if(collectDir.endsWith(File.separator)) { 590 collectDir = collectDir.substring(0, collectDir.length()-1); // remove file separator at end 591 } 592 593 // update .gli/config.xml to contain the version of the path without file-separator at end 594 if(collect_directory_path.equals(getDefaultGSCollectDirectoryPath(false))) { 595 Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), 596 true, ""); 597 } else { 598 Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), 599 true, collectDir); 600 } 601 602 // set non_standard_collect_directory_path variable. Ensures file_separator at end 603 Gatherer.setCollectDirectoryPath(collect_directory_path); 604 605 // Use version of path without file-separator at end to set collecthome in gsdlsite(3).cfg 606 if(collectDir != null) { 607 collectDir = "\""+collectDir+"\""; 608 } 609 Utility.updatePropertyConfigFile(getGsdlSiteConfigFile(), "collecthome", collectDir); 610 // if gsdlsite.cfg does not exist (if using server.exe for instance), the above method will just return 611 } 582 612 583 613 // If using a remote Greenstone we need to download the collection configurations now
Note:
See TracChangeset
for help on using the changeset viewer.