Changeset 14371

Show
Ignore:
Timestamp:
14.08.2007 15:28:42 (12 years ago)
Author:
qq6
Message:

if the loaded collection is not null,delete the gli.lck file when the current site is changed in the remote gli3

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java

    r14309 r14371  
    894894        System.err.println("event occurred "+event.paramString()); 
    895895        String site = (String) site_combobox.getSelectedItem(); 
    896         System.err.println("new site = "+site); 
     896        System.err.println("The site changed to = "+site); 
    897897        if (!site.equals(current_site_selection)) { 
    898898        current_site_selection = site; 
     
    915915            // Close the current collection, remove the lock on this file, ask to login to the new site, then download collection configurations of the site. 
    916916            if (Gatherer.c_man.getCollection()!=null){ 
     917            File lock_file = new File(Gatherer.c_man.getLoadedCollectionDirectoryPath() + "gli.lck"); 
     918            RemoteGreenstoneServer.deleteCollectionFile(Gatherer.c_man.getLoadedCollectionName(),lock_file); 
    917919            Gatherer.g_man.closeCurrentCollection(); 
    918920            } 
    919             File lock_file = new File(Gatherer.c_man.getLoadedCollectionDirectoryPath() + "gli.lck"); 
    920             RemoteGreenstoneServer.deleteCollectionFile(Gatherer.c_man.getLoadedCollectionName(),lock_file); 
    921921            Configuration.site_name=site; 
    922922            RemoteGreenstoneServer.set_remote_greenstone_server_authentication_to_null();