fix symlink check
This commit is contained in:
parent
ff752a1818
commit
35767b9105
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ class Command(BaseCommand):
|
||||||
type_ = e.data['type'][0].lower()
|
type_ = e.data['type'][0].lower()
|
||||||
target = os.path.join(prefix, type_, i.data['title'] + ext)
|
target = os.path.join(prefix, type_, i.data['title'] + ext)
|
||||||
os.makedirs(os.path.dirname(target), exist_ok=True)
|
os.makedirs(os.path.dirname(target), exist_ok=True)
|
||||||
if os.path.exists(target):
|
if os.path.islink(target):
|
||||||
os.unlink(target)
|
os.unlink(target)
|
||||||
os.symlink(source, target)
|
os.symlink(source, target)
|
||||||
clip[type_] = target
|
clip[type_] = target
|
||||||
|
|
Loading…
Reference in a new issue