mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:05:04 +02:00
Fix #7541 (Sony PRS 650 Thumbnails in wrong directory)
This commit is contained in:
parent
fe896f0c8e
commit
cf4ffc4607
1 changed files with 2 additions and 0 deletions
|
|
@ -199,6 +199,8 @@ def upload_cover(self, path, filename, metadata, filepath):
|
|||
thumbnail_dir = os.path.join(prefix, *thumbnail_dir.split('/'))
|
||||
|
||||
relpath = os.path.relpath(filepath, prefix)
|
||||
if relpath.startswith('..\\'):
|
||||
relpath = relpath[3:]
|
||||
thumbnail_dir = os.path.join(thumbnail_dir, relpath)
|
||||
if not os.path.exists(thumbnail_dir):
|
||||
os.makedirs(thumbnail_dir)
|
||||
|
|
|
|||
Loading…
Reference in a new issue