Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8257905: Make fixpath.sh more liberal in accepting paths embedded in …
…arguments

Reviewed-by: erikj
  • Loading branch information
magicus committed Dec 8, 2020
1 parent 044616b commit 264feb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions make/scripts/fixpath.sh
Expand Up @@ -293,7 +293,7 @@ function convert_path() {
winpath=""
# Start looking for drive prefix. Also allow /xxxx prefixes (typically options
# for Visual Studio tools), and embedded file:// URIs.
if [[ $arg =~ ^([^/]*|.*file://|/[a-zA-Z:]{1,3}:?)($DRIVEPREFIX/)([a-z])(/[^/]+.*$) ]] ; then
if [[ $arg =~ ^([^/]*|-[^:=]*[:=]|.*file://|/[a-zA-Z:]{1,3}:?)($DRIVEPREFIX/)([a-z])(/[^/]+.*$) ]] ; then
prefix="${BASH_REMATCH[1]}"
winpath="${BASH_REMATCH[3]}:${BASH_REMATCH[4]}"
# Change slash to backslash (or vice versa if mixed mode)
Expand All @@ -302,7 +302,7 @@ function convert_path() {
else
winpath="${winpath//'\'/'/'}"
fi
elif [[ $arg =~ ^([^/]*|(.*file://))(/([-_.a-zA-Z0-9]+)(/[-_.a-zA-Z0-9]+)+)(.*)?$ ]] ; then
elif [[ $arg =~ ^([^/]*|-[^:=]*[:=]|(.*file://))(/([-_.+a-zA-Z0-9]+)(/[-_.+a-zA-Z0-9]+)+)(.*)?$ ]] ; then
# This looks like a unix path, like /foo/bar. Also embedded file:// URIs.
prefix="${BASH_REMATCH[1]}"
pathmatch="${BASH_REMATCH[3]}"
Expand Down

1 comment on commit 264feb3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.