Try to create WORKSPACE relative paths
This commit is contained in:
parent
f61e44d6db
commit
0f636ea427
1 changed files with 8 additions and 5 deletions
|
|
@ -554,13 +554,16 @@ class MetaInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
String relativize(String path) {
|
||||
def Path thispath = Paths.get(path)
|
||||
if (thispath.startsWith(script.WORKSPACE)) {
|
||||
def Path mypath = Paths.get(path)
|
||||
String pathRelative
|
||||
if (mypath.startsWith(script.WORKSPACE)) {
|
||||
def Path wspath = Paths.get(script.WORKSPACE)
|
||||
def Path wsrelativePath = wspath.relativize(thispath)
|
||||
return wsrelativePath.toString()
|
||||
def Path wsrelativePath = wspath.relativize(mypath)
|
||||
pathRelative = wsrelativePath.toString()
|
||||
} else {
|
||||
pathRelative = mypath.toString()
|
||||
}
|
||||
return path
|
||||
return pathRelative
|
||||
}
|
||||
|
||||
static String metafilepath() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue