Skip to content

Commit

Permalink
[MNG-8218] Always normalize Path in PathSource (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet authored Aug 29, 2024
1 parent 3f430bb commit c948b26
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class PathSource implements ModelSource {
}

PathSource(Path path, String location) {
this.path = path;
this.location = location != null ? location : path.toString();
this.path = path.normalize();
this.location = location != null ? location : this.path.toString();
}

@Override
Expand Down Expand Up @@ -65,7 +65,7 @@ public ModelSource resolve(ModelLocator locator, String relative) {
Path path = getPath().getParent().resolve(norm);
Path relatedPom = locator.locateExistingPom(path);
if (relatedPom != null) {
return new PathSource(relatedPom.normalize(), null);
return new PathSource(relatedPom);
}
return null;
}
Expand Down

0 comments on commit c948b26

Please sign in to comment.