extend the current path rather than create a new subpath object
diff --git a/reclass/datatypes/exports.py b/reclass/datatypes/exports.py
index 52c5ef1..8471be2 100644
--- a/reclass/datatypes/exports.py
+++ b/reclass/datatypes/exports.py
@@ -71,7 +71,7 @@
paths = {}
path = DictPath(self._settings.delimiter)
for i in mainpath.key_parts():
- path = path.new_subpath(i)
+ path.add_subpath(i)
if path in self._unrendered:
paths[path] = True
for i in self._unrendered:
diff --git a/reclass/utils/dictpath.py b/reclass/utils/dictpath.py
index 8d9ee8b..aec6722 100644
--- a/reclass/utils/dictpath.py
+++ b/reclass/utils/dictpath.py
@@ -140,6 +140,9 @@
def delete(self, base):
del self._get_innermost_container(base)[self._get_key()]
+ def add_subpath(self, key):
+ self._parts.append(key)
+
def is_ancestor_of(self, other):
if len(other._parts) <= len(self._parts):
return False