Skip to content

Commit

Permalink
Updated the URL Normalize logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jayasheelankumar committed Apr 13, 2018
1 parent 577e703 commit f89a979
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,8 @@ public static String normalize(String origPath) {
// Normalize it...
if ((path != null) && (path.length() > 0)) {
path = path.replace('\\', '/');
// Remove leading '/' chars
while ((path.length() > 0) && (path.charAt(0) == '/')) {
path = path.substring(1);
}
// Replace all double "//" with "/"

// Replace all double "//" with "/"
while (path.indexOf("//") != -1) {
path = path.replace("//", "/");
}
Expand Down

0 comments on commit f89a979

Please sign in to comment.