- Timestamp:
- 2010-10-15T20:33:43+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/greenstone/LocalLibraryServer.java
r23015 r23143 70 70 static private boolean isPersistentServer = false; 71 71 72 static public boolean isPersistentServer() { 73 return isPersistentServer; 74 } 75 72 76 static public void addCollection(String collection_name) 73 77 { … … 395 399 if (isPersistentServer) { 396 400 config(QUIT_COMMAND); 397 } else { 401 } else { 398 402 boolean success = sendMessageToServer("QUIT\n"); 399 403 try { … … 697 701 // Set the correct collectdir (from last time) before the server is started up 698 702 699 //String collectDir = Configuration.getString("general.open_collection_gs2", true);700 703 String orig_collection_path = Configuration.getString("general.open_collection_gs2", true); 701 String collectDir = Gatherer.getCollectDirectoryPath(); 704 String collectDir = Gatherer.getCollectDirectoryPath(); // Gatherer would've set this up 702 705 String defaultColDir = Gatherer.getDefaultGSCollectDirectoryPath(true); // with file separator at end 703 704 // If opening a collection outside the standard GS collect folder, need 705 // to open the non-standard collect folder that the collection resides in. 706 // Also, would have been forced to change the loaded collection--and hence collectDir-- 707 // to the default coldir if orig_col_path was "" or led to a collectdir that didn't exist 708 // (in the last case, gsdlsite.cfg already corrected in Gatherer if coldir was changed). 709 706 710 707 if(orig_collection_path.equals("")) { // default GS collect dir path 711 708 return; 712 709 } 713 710 714 if (Gatherer.open_collection_file_path != null // may be null if no_load was specified on GLI startup 715 && (!orig_collection_path.startsWith(collectDir) // if coldir would've been changed on startup OR if coldir is non-standard collect folder 716 || !collectDir.equals(defaultColDir))) 711 if (!orig_collection_path.startsWith(collectDir) // if coldir would've been changed on startup OR if coldir is non-standard collect folder 712 || !collectDir.equals(defaultColDir)) 717 713 { 718 714 // if we're running *server.exe* and if the current collect dir at Local Lib's startup is … … 720 716 // dir because the non-standard collectDir didn't exist/wasn't specified in the GLI config 721 717 // file, then write out the new collectDir (minus file separator at end) to the lls site conf in use 718 // Regardless of what collecthome value was in the llssite/glisite file, we end up resetting it here 722 719 if (isPersistentServer) { // server.exe, so we're dealing with a local GS2 723 720 put(COLLECTHOME, collectDir);
Note:
See TracChangeset
for help on using the changeset viewer.