fix symlink check

This commit is contained in:
j 2023-10-28 15:12:45 +02:00
parent ff752a1818
commit 35767b9105

View file

@ -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