Changeset 34115


Ignore:
Timestamp:
2020-05-19T15:03:21+12:00 (4 years ago)
Author:
kjdon
Message:

a couple changes. 1 don't explicitly need to remove the lock file from remote server, as closeCurrentCollection will do that anyway. delete the lock command was being called twice. 2. I have commented out the clearing out authentication info part. We only have one set of uers anyway, so why should we need to re authenticate when switching sites? Also, getting a thread issue. if there is no authentication data saved, then we need to do a popup username/password window. This is being called by SwingUtilities.invokeAndWait, which blocks until all pending awt events have processed. Presumably, this is waiting for the preferences window to finish, but as the preferences window can't finish until the authentication is done, then we have a stalemate. Immediate solution is to just keep the current authentication data.

File:
1 edited

Legend:

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

    r32706 r34115  
    11831183            // Close the current collection, remove the lock on this file, ask to login to the new site, then download collection configurations of the site.
    11841184            if (Gatherer.c_man.getCollection()!=null){
    1185             File lock_file = new File(Gatherer.c_man.getLoadedCollectionDirectoryPath() + "gli.lck");
    1186             Gatherer.remoteGreenstoneServer.deleteCollectionFile(Gatherer.c_man.getLoadedCollectionName(),lock_file);
     1185            // why doing this lock file by hand? closeCurrentCollection also deletes the lock file on the server.
     1186            //File lock_file = new File(Gatherer.c_man.getLoadedCollectionDirectoryPath() + "gli.lck");
     1187            //Gatherer.remoteGreenstoneServer.deleteCollectionFile(Gatherer.c_man.getLoadedCollectionName(),lock_file);
    11871188            Gatherer.g_man.closeCurrentCollection();
    11881189            }
    11891190            Configuration.site_name=site;
    1190             Gatherer.remoteGreenstoneServer.set_remote_greenstone_server_authentication_to_null();
     1191            // kjdon - commented this out as we only have one set of
     1192            // users for entire gs install. And this will cause an authentication popup from inside PReferences which cannot display as its waiting for
     1193            // prefs to finish before running itself.
     1194            //Gatherer.remoteGreenstoneServer.set_remote_greenstone_server_authentication_to_null();
     1195            System.err.println("download colls");
    11911196            Gatherer.remoteGreenstoneServer.downloadCollectionConfigurations();
    11921197        }
Note: See TracChangeset for help on using the changeset viewer.