From 0f636ea4276e66e4656eaf8afb2e9ae760abba27 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 26 Feb 2019 16:07:52 +0000 Subject: [PATCH] Try to create WORKSPACE relative paths --- meta/folder.groovy | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/meta/folder.groovy b/meta/folder.groovy index 52ceb06..245d961 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -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() {