offsetpath field in meta files was absolute; should be relative to workspace
This commit is contained in:
parent
0f636ea427
commit
dc6e7c6b1d
1 changed files with 4 additions and 1 deletions
|
|
@ -556,12 +556,15 @@ class MetaInfo extends GISJsonSerialised {
|
|||
String relativize(String path) {
|
||||
def Path mypath = Paths.get(path)
|
||||
String pathRelative
|
||||
if (mypath.startsWith(script.WORKSPACE)) {
|
||||
script.echo("Seeing if ${path} begins with from ${script.WORKSPACE}")
|
||||
if (path.startsWith(script.WORKSPACE)) {
|
||||
def Path wspath = Paths.get(script.WORKSPACE)
|
||||
def Path wsrelativePath = wspath.relativize(mypath)
|
||||
pathRelative = wsrelativePath.toString()
|
||||
script.echo("Extracted ${pathRelative} from ${wspath.toString()} and ${mypath.toString()}"
|
||||
} else {
|
||||
pathRelative = mypath.toString()
|
||||
script.echo("Path relative is unchanged: ${pathRelative}"
|
||||
}
|
||||
return pathRelative
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue