mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[core] Create parent directories of symlinks if required
This commit is contained in:
parent
ac5af04980
commit
4bccd460ad
|
@ -1899,6 +1899,10 @@ class LegendaryCore:
|
||||||
|
|
||||||
for link, target in symlinks:
|
for link, target in symlinks:
|
||||||
_link = os.path.join(path, link)
|
_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:
|
try:
|
||||||
os.symlink(target, _link)
|
os.symlink(target, _link)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in a new issue