Changeset 7925


Ignore:
Timestamp:
2004-08-10T11:27:15+12:00 (20 years ago)
Author:
davidb
Message:

URL arguments to launch now encoded, to ensure spaces etc. are handled correctly.

Added "uploading" and "downloading" messages to progress-bar for when
GLI is run as applet and transferring files between local machine
and server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/shell/GShell.java

    r7739 r7925  
    238238            if (!args[i+1].startsWith(StaticStrings.MINUS_CHARACTER)) {
    239239                i++;
    240                 String val = args[i];
     240                String val = URLEncoder.encode(args[i],"UTF-8");
    241241                launch = launch + val;
    242242            }
     
    249249
    250250        System.err.println("**** launch url = " + launch);
     251        // fireMessage(type, Dictionary.get("GShell.Command") + ": " + launch, status, null); // ****
    251252
    252253        URL launch_url = new URL(launch);
     
    425426    if (Gatherer.isGsdlRemote) {
    426427        if (type == IMPORT) {
     428        if (progress!=null) {
     429            progress.messageOnProgressBar("Uploading data to server");
     430        }
     431
    427432        // zip up import folder
    428433        Utility.zipup(col_name,"import");
     
    433438        Utility.zipup(col_name,Utility.CONFIG_FILE);
    434439        Utility.upload_url_zip(col_name,"etc");
     440
     441        if (progress!=null) {
     442            progress.messageOnProgressBar("");
     443        }
     444
    435445        }
    436446    }
     
    457467        // download the archives directory (if gsdl server is remote)           
    458468        if (Gatherer.isGsdlRemote) {
     469
     470            if (progress!=null) {
     471            progress.messageOnProgressBar("Downloading archive data from server");
     472            }
     473
     474
    459475            Utility.delete(Gatherer.c_man.getCollectionArchive()); // remove current archives
    460476            Utility.download_url_zip(col_name,"archives");
    461477            Utility.unzip(col_name);
     478
     479            if (progress!=null) {
     480            progress.messageOnProgressBar("");
     481            }
    462482        }
    463483
     
    472492        // download the building directory (if gsdl server is remote)           
    473493        if (Gatherer.isGsdlRemote) {
     494            if (progress!=null) {
     495            progress.messageOnProgressBar("Downloading index data from server");
     496            }
     497
    474498            Utility.delete(Gatherer.c_man.getCollectionBuild()); // remove current build dir
    475499            Utility.download_url_zip(col_name,"building");
    476500            Utility.unzip(col_name);
     501
     502            if (progress!=null) {
     503            progress.messageOnProgressBar("");
     504            }
     505
    477506        }
    478507
Note: See TracChangeset for help on using the changeset viewer.