Changeset 2157


Ignore:
Timestamp:
01/24/07 10:36:07 (13 years ago)
Author:
melissa
Message:

Fix to allow filenames with spaces - requires filename to be enclosed in
quotes in config file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/test/ConfigurationFiles.java

    r2156 r2157  
    6969      String line = st.nextToken(); 
    7070      if (!line.startsWith("#") && line.trim().length() > 0) { 
     71        // file name should be enclosed in double quotes 
     72        String file = line.substring(1, line.indexOf("\"", 2)); 
     73        line = line.substring(line.indexOf("\"", 2) + 2); 
     74        file = new Location(l.getParent(), file).getAbsolutePath(); 
    7175        StringTokenizer spaces = new StringTokenizer(line, " "); 
    72         String file =  
    73           new Location(l.getParent(), spaces.nextToken()).getAbsolutePath();  
    7476        int nSeries = Integer.parseInt(spaces.nextToken()); 
    7577        numSeries.put(file, new Integer(nSeries)); 
Note: See TracChangeset for help on using the changeset viewer.