Changeset 37310


Ignore:
Timestamp:
2023-02-13T11:25:18+13:00 (15 months ago)
Author:
kjdon
Message:

webswing gli, gsdl_path etc get passed in unix-style. but if we are running as windows, we end up later with half and half paths, with some unix, some windows slashes. this causes problems eg current collect dir (from config file) not matching gli default collect dir. So best to convert paths here. Need to add File separator back on the the end as GLI expects this.

File:
1 edited

Legend:

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

    r37188 r37310  
    155155    self = this; // allows Configuration to statically refer to itself in the static methods
    156156
    157     this.gli_user_directory_path = gli_user_directory_path;
    158     this.gsdl_path = gsdl_path;
    159     this.gsdl3_path = gsdl3_path;
    160     this.gsdl3_src_path = gsdl3_src_path;
     157    try {
     158        // this mainly needed for webswing, where the paths are unix style, but if running on windows we need to convert them
     159    this.gli_user_directory_path = new File(gli_user_directory_path).getCanonicalPath()+File.separator;
     160    this.gsdl_path = new File(gsdl_path).getCanonicalPath()+File.separator;
     161    this.gsdl3_path = new File(gsdl3_path).getCanonicalPath()+File.separator;
     162    this.gsdl3_src_path = new File(gsdl3_src_path).getCanonicalPath()+File.separator;
     163    } catch(IOException e) {
     164        System.err.println("IOException with supplied path arguments:"+e.getMessage());
     165        System.exit(0);
     166    }
    161167    this.site_name = site_name;
    162168    this.servlet_path = servlet_path;
Note: See TracChangeset for help on using the changeset viewer.