From 35767b910533b2d4b26cc45186045a8c77a60137 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 28 Oct 2023 15:12:45 +0200 Subject: [PATCH] fix symlink check --- management/commands/generate_clips.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/management/commands/generate_clips.py b/management/commands/generate_clips.py index 02a6f2d..270c6bd 100644 --- a/management/commands/generate_clips.py +++ b/management/commands/generate_clips.py @@ -46,7 +46,7 @@ class Command(BaseCommand): type_ = e.data['type'][0].lower() target = os.path.join(prefix, type_, i.data['title'] + ext) os.makedirs(os.path.dirname(target), exist_ok=True) - if os.path.exists(target): + if os.path.islink(target): os.unlink(target) os.symlink(source, target) clip[type_] = target