Changeset 2304


Ignore:
Timestamp:
02/21/07 12:49:40 (13 years ago)
Author:
melissa
Message:

Don't throw an exception if the image name wasn't specified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/ome/upload/OMEUploader.java

    r2178 r2304  
    734734 
    735735    // set the Image information 
     736   
     737    if (imageIDs == null) return; 
    736738 
    737739    Image image = (Image) df.createNew(Image.class); 
     
    739741 
    740742    String name = xml.getImageName(null); 
    741     if (name == null || name.trim().equals("")) name = (String) files.get(0); 
    742     try { 
    743       name = name.substring(name.lastIndexOf(File.separator) + 1); 
    744     } 
    745     catch (Exception e) { } 
     743    if ((name == null || name.trim().equals("")) && files.size() > 0) { 
     744      name = (String) files.get(0); 
     745      try { 
     746        name = name.substring(name.lastIndexOf(File.separator) + 1); 
     747      } 
     748      catch (Exception e) { } 
     749    } 
    746750 
    747751    image.setName(name); 
Note: See TracChangeset for help on using the changeset viewer.