[core] Create parent directories of symlinks if required

This commit is contained in:
derrod 2022-01-05 14:24:46 +01:00
parent ac5af04980
commit 4bccd460ad

View file

@ -1899,6 +1899,10 @@ class LegendaryCore:
for link, target in symlinks:
_link = os.path.join(path, link)
_parent = os.path.split(_link)[0]
if not os.path.exists(_parent):
os.makedirs(_parent, exist_ok=True)
try:
os.symlink(target, _link)
except Exception as e: