mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 19:54:18 +02:00
Fix #4690 (Error while sending book with non-ascii character in title/author to device)
This commit is contained in:
parent
e87c1cc343
commit
c3cba391b7
1 changed files with 2 additions and 0 deletions
|
|
@ -808,6 +808,8 @@ def create_upload_path(self, path, mdata, fname):
|
|||
ext = os.path.splitext(fname)[1]
|
||||
|
||||
from calibre.library.save_to_disk import get_components
|
||||
if not isinstance(template, unicode):
|
||||
template = template.decode('utf-8')
|
||||
extra_components = get_components(template, mdata, fname)
|
||||
if not extra_components:
|
||||
extra_components.append(sanitize(self.filename_callback(fname,
|
||||
|
|
|
|||
Loading…
Reference in a new issue