offsetpath field in meta files was absolute; should be relative to workspace

This commit is contained in:
Dan Hawkins 2019-02-27 08:46:23 +00:00
commit dedcdfd5e9

View file

@ -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}")