| | } |
| | |
| | - final var relative = imagesDir.relativize( location ); |
| | + final var relative = imagesDir.normalize().relativize( location ); |
| | |
| | attr.setTextContent( relative.toString() ); |
 |
| | final var filename = format( |
| | "%s%s%s", src, extension.isBlank() ? "" : ".", extension ); |
| | - imageFile = imagePath.resolve( filename ); |
| | + imageFile = imagePath.resolve( filename ).normalize(); |
| | |
| | if( toFile( imageFile ).exists() ) { |
| | found = true; |
| | break; |
| | } |
| | } |
| | |
| | if( !found ) { |
| | imagePath = getDocumentDir(); |
| | - imageFile = imagePath.resolve( src ); |
| | + imageFile = imagePath.resolve( src ).normalize(); |
| | |
| | if( !toFile( imageFile ).exists() ) { |