From 06ca80c596d36ce9c758edd6982132eec3e3c44a Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Wed, 27 Feb 2019 08:46:23 +0000 Subject: [PATCH] offsetpath field in meta files was absolute; should be relative to workspace --- meta/folder.groovy | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meta/folder.groovy b/meta/folder.groovy index adfee97..f9d4bf3 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -563,12 +563,10 @@ class MetaInfo extends GISJsonSerialised { pathRelative = mypath script.echo("Path relative is unchanged: ${pathRelative}") } + // Convert \ with / + pathRelative = pathRelative.tokenize('\\').join('/') // Strip leading / if any pathRelative = pathRelative.replaceAll('^/+', '') - // Strip leading \ if any - pathRelative = pathRelative.replaceAll('^\\+', '') - // Convert \ with / - pathRelative = pathRelative.replace('\\', '/') script.echo("Path relative is ${pathRelative}")