From d834ba507575d2abaaf0279c21e4cd77fbd09981 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 2 Sep 2022 08:14:15 -0300 Subject: [PATCH] [Diff][Fixed] Problems with overwriting the symlink --- kibot/out_diff.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kibot/out_diff.py b/kibot/out_diff.py index bc0d63a1..cd74dea5 100644 --- a/kibot/out_diff.py +++ b/kibot/out_diff.py @@ -293,6 +293,8 @@ class DiffOptions(BaseOptions): if self.copy_instead_of_link: copy2(name, target) else: + if os.path.isfile(target): + os.remove(target) os.symlink(os.path.basename(name), target) finally: # Clean-up