Try to create WORKSPACE relative paths

This commit is contained in:
Dan Hawkins 2019-02-26 16:07:52 +00:00
commit f37be2706a

View file

@ -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() {