[MNG-8218] Always normalize Path in PathSource (#1684)

This commit is contained in:
Guillaume Nodet 2024-08-29 19:44:16 +02:00 committed by GitHub
parent 3f430bbd07
commit c948b26484
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -35,8 +35,8 @@ class PathSource implements ModelSource {
} }
PathSource(Path path, String location) { PathSource(Path path, String location) {
this.path = path; this.path = path.normalize();
this.location = location != null ? location : path.toString(); this.location = location != null ? location : this.path.toString();
} }
@Override @Override
@ -65,7 +65,7 @@ class PathSource implements ModelSource {
Path path = getPath().getParent().resolve(norm); Path path = getPath().getParent().resolve(norm);
Path relatedPom = locator.locateExistingPom(path); Path relatedPom = locator.locateExistingPom(path);
if (relatedPom != null) { if (relatedPom != null) {
return new PathSource(relatedPom.normalize(), null); return new PathSource(relatedPom);
} }
return null; return null;
} }