mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix #7541 (Sony PRS 650 Thumbnails in wrong directory)
This commit is contained in:
parent
fe896f0c8e
commit
cf4ffc4607
@ -199,6 +199,8 @@ class PRS505(USBMS):
|
||||
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…
x
Reference in New Issue
Block a user