[bugfix] take care of more unescaped backslashes in Metadata

This commit is contained in:
Marcel Paffrath 2024-09-16 16:27:36 +02:00
parent 9333ebf7f3
commit 18c37dfdd0

View File

@ -59,6 +59,8 @@ class Metadata(object):
:type path_to_inventory: str
:return: None
"""
path_to_inventory = path_to_inventory.replace('\\', '/')
path_to_inventory = os.path.abspath(path_to_inventory)
assert (os.path.isdir(path_to_inventory)), '{} is no directory'.format(path_to_inventory)
if path_to_inventory not in self.inventories:
self.inventories.append(path_to_inventory)