islink not exists

This commit is contained in:
j 2023-10-21 15:46:03 +01:00
parent ecd88fe8a2
commit 215f0db071

View file

@ -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] = {