forked from 0x2620/pandora
dont fail to create torrent for unicode titles
This commit is contained in:
parent
6386ec9b14
commit
9db8b57dd2
1 changed files with 2 additions and 0 deletions
|
@ -1059,6 +1059,8 @@ class Item(models.Model):
|
|||
return
|
||||
base = self.path('torrent')
|
||||
base = os.path.abspath(os.path.join(settings.MEDIA_ROOT, base))
|
||||
if isinstance(base, unicode):
|
||||
base = base.encode('utf-8')
|
||||
if os.path.exists(base):
|
||||
shutil.rmtree(base)
|
||||
ox.makedirs(base)
|
||||
|
|
Loading…
Reference in a new issue