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 4a4f5c5 commit 504887c
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
Expand Up @@ -74,6 +74,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 504887c

Please sign in to comment.