Skip to content

Commit e0e46c3

Browse files
[MOD] IO: Workaround for URIs with invalid characters
1 parent fa6408f commit e0e46c3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

basex-core/src/main/java/org/basex/io/IOFile.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ static String toPath(final String uri) {
101101
return new URL(uri).toURI().getPath();
102102
} catch(final Exception ex) {
103103
Util.debug(ex);
104-
return uri;
104+
// workaround for URIs with invalid characters
105+
return uri.replaceAll("^" + FILEPREF + '*', "/").replaceFirst("^/([A-Za-z]:)", "$1");
105106
}
106107
}
107108

0 commit comments

Comments
 (0)