Changeset 3707 for print

Show
Ignore:
Timestamp:
12/13/10 11:44:05 (18 months ago)
Author:
jeichar
Message:

make it easier for windows users to create image urls closes: r=elemoine closes #611

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • print/trunk/src/main/java/org/mapfish/print/PDFUtils.java

    r3653 r3707  
    226226        } 
    227227        result.append(val); 
    228         return result.toString(); 
     228        String uri = result.toString(); 
     229 
     230        if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0){ 
     231            uri = uri.replace("\\", "/"); 
     232            if(uri.matches("file://\\w:(/.*)?")) { 
     233                return "file:/"+uri.substring(7); 
     234            } 
     235        } 
     236 
     237        return uri; 
    229238    } 
    230239