Changeset 6567


Ignore:
Timestamp:
06/23/10 13:09:09 (9 years ago)
Author:
melissa
Message:

Fixed how pixels files are found, so that having multiple *.vws files in the same directory doesn't cause a problem.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/in/TillVisionReader.java

    r6376 r6567  
    306306 
    307307      String[] files = directory.list(true); 
     308      String name = currentId.substring( 
     309        currentId.lastIndexOf(File.separator) + 1, currentId.lastIndexOf(".")); 
    308310 
    309311      int nextFile = 0; 
    310312 
    311313      for (String f : files) { 
    312         if (f.endsWith(".pst")) { 
     314        if (checkSuffix(f, "pst") && f.startsWith(name)) { 
    313315          Location pst = new Location(directory, f); 
    314316          if (pst.isDirectory()) { 
    315317            String[] subfiles = pst.list(true); 
    316318            for (String q : subfiles) { 
    317               if (q.endsWith(".pst") && nextFile < nImages) { 
     319              if (checkSuffix(q, "pst") && nextFile < nImages) { 
    318320                pixelsFile[nextFile++] = f + File.separator + q; 
    319321              } 
  • trunk/components/bio-formats/src/loci/formats/in/TillVisionReader.java

    r6377 r6567  
    306306 
    307307      String[] files = directory.list(true); 
     308      String name = currentId.substring( 
     309        currentId.lastIndexOf(File.separator) + 1, currentId.lastIndexOf(".")); 
    308310 
    309311      int nextFile = 0; 
    310312 
    311313      for (String f : files) { 
    312         if (f.endsWith(".pst")) { 
     314        if (checkSuffix(f, "pst") && f.startsWith(name)) { 
    313315          Location pst = new Location(directory, f); 
    314316          if (pst.isDirectory()) { 
    315317            String[] subfiles = pst.list(true); 
    316318            for (String q : subfiles) { 
    317               if (q.endsWith(".pst") && nextFile < nImages) { 
     319              if (checkSuffix(q, "pst") && nextFile < nImages) { 
    318320                pixelsFile[nextFile++] = f + File.separator + q; 
    319321              } 
Note: See TracChangeset for help on using the changeset viewer.