Changeset 3446


Ignore:
Timestamp:
12/06/07 10:10:13 (13 years ago)
Author:
melissa
Message:

Make sure absolute file paths are used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/FileStitcher.java

    r3445 r3446  
    862862      String file = fp.getFiles()[0]; 
    863863      Location dir = new Location(file).getAbsoluteFile().getParentFile(); 
     864      String dpath = dir.getAbsolutePath(); 
    864865      String[] fs = dir.list(); 
    865866 
    866867      setFiles(fs, seriesBlocks[0], fp.getFirst()[0], fp.getLast()[0], 
    867         fp.getStep()[0], "", 0); 
     868        fp.getStep()[0], dpath, 0); 
    868869 
    869870      seriesCount = fileVector.size(); 
     
    12261227    Vector v = new Vector(); 
    12271228    for (int i=0; i<f.length; i++) { 
     1229      if (f[i].indexOf(File.separator) != -1) { 
     1230        f[i] = f[i].substring(f[i].lastIndexOf(File.separator) + 1); 
     1231      } 
     1232      if (dir.endsWith(File.separator)) f[i] = dir + f[i]; 
     1233      else f[i] = dir + File.separator + f[i]; 
    12281234      if (f[i].indexOf(block) != -1 && new Location(f[i]).exists()) { 
    1229         v.add(f[i]); 
     1235        v.add(f[i].substring(f[i].lastIndexOf(File.separator) + 1)); 
    12301236      } 
    12311237    } 
Note: See TracChangeset for help on using the changeset viewer.