gen_eh_elf: symlinks: remove if present
This commit is contained in:
parent
65b08a444a
commit
d53fcd22c6
|
@ -198,6 +198,12 @@ def gen_eh_elf(obj_path, config):
|
||||||
|
|
||||||
# Re-create symlinks
|
# Re-create symlinks
|
||||||
for elt in link_chain:
|
for elt in link_chain:
|
||||||
|
if os.path.exists(elt[0]):
|
||||||
|
if not os.path.islink(elt[0]):
|
||||||
|
raise Exception(
|
||||||
|
"{}: file already exists and is not a symlink.".format(
|
||||||
|
elt[0]))
|
||||||
|
os.remove(elt[0])
|
||||||
os.symlink(elt[1], elt[0])
|
os.symlink(elt[1], elt[0])
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue