Skip to content

Commit

Permalink
fix parse of /${foo}. was // + foo
Browse files Browse the repository at this point in the history
I don't think this changes anything substantative, but it's a cleaner
internal representation.
  • Loading branch information
Radvendii committed Aug 31, 2021
1 parent b2beb97 commit 3913643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libexpr/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ path_start
: PATH {
Path path(absPath($1, data->basePath));
/* add back in the trailing '/' to the first segment */
if ($1[strlen($1)-1] == '/')
if ($1[strlen($1)-1] == '/' && strlen($1) > 1)
path += "/";
$$ = new ExprPath(path);
}
Expand Down

0 comments on commit 3913643

Please sign in to comment.