Changeset 5076


Ignore:
Timestamp:
2003-08-01T14:46:01+12:00 (21 years ago)
Author:
jmt12
Message:

Fixed problem with import directory argument that was passed to perl ending with an escape character under windows - changes to line no. 711-715, 723, 730

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r5037 r5076  
    107107
    108108    /** The name of the standard lock file. */
    109     static final public String LOCK_FILE = "gatherer.lck";
     109    static final public String LOCK_FILE = "gli.lck";
    110110    static final public int NO_SPECIAL_CASE = -1;
    111111    static final public int SPECIAL_DLS = 0;
     
    709709    else {
    710710        importing = true;
     711        // Remove erroneous file windows file separator as it causes problems when running import.pl
     712        String collection_import = getCollectionImport();
     713        if(collection_import.length() > 2 && collection_import.endsWith("\\")) {
     714        collection_import = collection_import.substring(0, collection_import.length() - 1);
     715        }
    711716        String args[];
    712717        if(Utility.isWindows()) {
     
    716721        args[2] = Gatherer.config.getScriptPath() + "import.pl";
    717722        args[3] = "-importdir";
    718         args[4] = getCollectionImport();
     723        args[4] = collection_import;
    719724        args[5] = collection.getName();
    720725        }
     
    723728        args[0] = Gatherer.config.getScriptPath() + "import.pl";
    724729        args[1] = "-importdir";
    725         args[2] = getCollectionImport();
     730        args[2] = collection_import;
    726731        args[3] = collection.getName();
    727732        }
     733        collection_import = null;
    728734        args = ArrayTools.add(args, collection.build_options.getImportValues());
    729735        GShell shell = new GShell(args, GShell.IMPORT, Message.BUILDING, this, import_monitor, GShell.GSHELL_IMPORT);
Note: See TracChangeset for help on using the changeset viewer.