Changeset 6803


Ignore:
Timestamp:
08/17/10 12:44:27 (9 years ago)
Author:
melissa
Message:

Backported r6802 to 4.1 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/components/bio-formats/src/loci/formats/in/L2DReader.java

    r6051 r6803  
    8080    String[] list = parent.list(); 
    8181 
     82    boolean hasScan = false, hasRootFile = false; 
     83 
    8284    for (String file : list) { 
    83       if (checkSuffix(file, "scn")) return true; 
    84     } 
    85     return false; 
     85      if (checkSuffix(file, "scn")) { 
     86        hasScan = true; 
     87        break; 
     88      } 
     89    } 
     90 
     91    parent = parent.getParentFile(); 
     92    if (parent == null) return false; 
     93    list = parent.list(); 
     94    if (list == null) return false; 
     95 
     96    for (String file : list) { 
     97      if (checkSuffix(file, "l2d")) { 
     98        hasRootFile = true; 
     99        break; 
     100      } 
     101    } 
     102 
     103    return hasScan && hasRootFile; 
    86104  } 
    87105 
     
    171189          StringTokenizer names = new StringTokenizer(value, ","); 
    172190          while (names.hasMoreTokens()) { 
    173             scans.add(names.nextToken().trim()); 
     191            String name = names.nextToken().trim(); 
     192            Location scanDir = new Location(parent, name); 
     193            if (scanDir.exists() && scanDir.isDirectory()) { 
     194              scans.add(name); 
     195            } 
    174196          } 
    175197        } 
Note: See TracChangeset for help on using the changeset viewer.