Skip to content

Commit

Permalink
8298667: Improved path handling
Browse files Browse the repository at this point in the history
Reviewed-by: mbalao
Backport-of: 900abc284669d1aadeac8026ad618c9f1dc553a6
  • Loading branch information
Aleksei Voitylov authored and RealCLanger committed Apr 12, 2023
1 parent 0e67976 commit e78fe92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/java.base/unix/classes/sun/nio/fs/UnixUriUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ static Path fromUri(UnixFileSystem fs, URI uri) {
int pos = 0;
while (pos < len) {
char c = p.charAt(pos++);
if ((c == '/') && (pos < len) && (p.charAt(pos) == '/')) {
// skip redundant slashes
continue;
}
byte b;
if (c == '%') {
assert (pos+2) <= len;
Expand Down

0 comments on commit e78fe92

Please sign in to comment.