From 215f0db07174acd01a26f397547a8fd16ade13ec Mon Sep 17 00:00:00 2001 From: j Date: Sat, 21 Oct 2023 15:46:03 +0100 Subject: [PATCH] islink not exists --- 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 313956b..2a6a5ea 100644 --- a/management/commands/generate_clips.py +++ b/management/commands/generate_clips.py @@ -59,7 +59,7 @@ class Command(BaseCommand): src = source.data.path target = os.path.join(prefix, 'voice_over', batch, '%s.wav' % fragment_id) os.makedirs(os.path.dirname(target), exist_ok=True) - if os.path.exists(target): + if os.path.islink(target): os.unlink(target) os.symlink(src, target) voice_over[fragment_id][batch] = {