Changeset 7485


Ignore:
Timestamp:
01/04/11 13:09:27 (9 years ago)
Author:
melissa
Message:

Escape backslashes when finding a pattern. Closes #634.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/FilePattern.java

    r7352 r7485  
    438438    } 
    439439    sb.append(q > 0 ? name.substring(endList[q - 1]) : name); 
     440 
     441    for (int i=0; i<sb.length(); i++) { 
     442      if (sb.charAt(i) == '\\') { 
     443        sb.insert(i, '\\'); 
     444        i++; 
     445      } 
     446    } 
     447 
    440448    return sb.toString(); 
    441449  } 
     
    560568    if (blocks.length == 0) { 
    561569      // regex pattern 
     570 
     571      if (new Location(pattern).exists()) { 
     572        fileList.add(pattern); 
     573        return; 
     574      } 
    562575 
    563576      String[] files = null; 
Note: See TracChangeset for help on using the changeset viewer.