Changeset 4118


Ignore:
Timestamp:
06/17/08 11:02:17 (11 years ago)
Author:
curtis
Message:

Reject Micromanager datasets with empty metadata.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/MicromanagerReader.java

    r4048 r4118  
    6565  /* @see loci.formats.IFormatReader#isThisType(String, boolean) */ 
    6666  public boolean isThisType(String name, boolean open) { 
    67     if (name.endsWith(METADATA)) return true; 
     67    if (name.equals(METADATA) || name.endsWith(File.separator + METADATA)) { 
     68      return true; 
     69    } 
    6870    if (!open) return false; // not allowed to touch the file system 
    6971    Location parent = new Location(name).getAbsoluteFile().getParentFile(); 
    70     return new Location(parent, METADATA).exists(); 
     72    Location metaFile = new Location(parent, METADATA); 
     73    return metaFile.exists() && metaFile.length() > 0; 
    7174  } 
    7275 
Note: See TracChangeset for help on using the changeset viewer.