Correct initial gather paths

This commit is contained in:
Dan Hawkins 2021-12-20 16:46:50 +00:00
commit 09b3c99bfe

View file

@ -923,18 +923,8 @@ class MetaInfo extends GISJsonSerialised {
def openchildmeta(String gatheredpath, String gatheredmetapath, RelatedMetaInfo relatedmetainfo) {
def MetaInfo mi = new MetaInfo(script)
def String nextgatheredpath
if (gatheredpath == '') {
nextgatheredpath = "${relatedmetainfo.offsetpath}"
} else {
nextgatheredpath = "${gatheredpath}/${relatedmetainfo.offsetpath}"
}
def String nextgatheredmetapath
if (gatheredmetapath == '') {
nextgatheredmetapath = "${relatedmetainfo.offsetpath}/${METAFOLDERNAME}"
} else {
nextgatheredmetapath = "${gatheredmetapath}/${relatedmetainfo.offsetpath}"
}
def String nextgatheredpath = (gatheredpath == '' ? relatedmetainfo.offsetpath : "${gatheredpath}/${relatedmetainfo.offsetpath}")
def String nextgatheredmetapath = (gatheredmetapath == '' ? "${relatedmetainfo.offsetpath}/${METAFOLDERNAME}" : "${gatheredmetapath}/${relatedmetainfo.offsetpath}"
def importedmetafile = "${nextgatheredmetapath}/${METAFILENAME}"
def boolean imported
if (script.fileExists(importedmetafile)) {
@ -972,11 +962,13 @@ class MetaInfo extends GISJsonSerialised {
for (relatedmetainfo in associatedmeta) {
if (!relatedmetainfo.format || relatedmetainfo.format == '0.1') {
def MetaInfo othermeta = relatedmetainfo.meta
def String nextgatheredpath = (gatheredpath == '' ? relatedmetainfo.offsetpath : "${gatheredpath}/${relatedmetainfo.offsetpath}")
def String nextgatheredmetapath = (gatheredmetapath == '' ? gatheredmetapath : "${gatheredmetapath}/${relatedmetainfo.offsetpath}")
results = othermeta.walkrelated_v0_1(results.metacollection,
results.comment,
level + 1,
"${gatheredpath}/${relatedmetainfo.offsetpath}",
"${gatheredmetapath}/${relatedmetainfo.offsetpath}",
nextgatheredpath,
nextgatheredmetapath,
limiteddepth,
maxdepth - 1)
} else {
@ -1032,9 +1024,7 @@ class MetaInfo extends GISJsonSerialised {
def allrelatedmeta(String metapath = '') {
ArrayList<CollectedMeta> metacollection = new ArrayList<CollectedMeta>()
def startmetapath = (metapath == '' ? METAFOLDERNAME : "${metapath}/${METAFOLDERNAME}")
return walkrelated(metacollection, '', 0, '', startmetapath)
return walkrelated(metacollection, '', 0, '', metapath)
}
ArrayList<CollectedMeta> releasewalker(int maxdepth, String startpath = '', String startmetapath = '') {