Fix #7541 (Sony PRS 650 Thumbnails in wrong directory)

This commit is contained in:
Kovid Goyal 2010-11-16 14:44:48 -07:00
parent fe896f0c8e
commit cf4ffc4607

View File

@ -199,6 +199,8 @@ class PRS505(USBMS):
thumbnail_dir = os.path.join(prefix, *thumbnail_dir.split('/')) thumbnail_dir = os.path.join(prefix, *thumbnail_dir.split('/'))
relpath = os.path.relpath(filepath, prefix) relpath = os.path.relpath(filepath, prefix)
if relpath.startswith('..\\'):
relpath = relpath[3:]
thumbnail_dir = os.path.join(thumbnail_dir, relpath) thumbnail_dir = os.path.join(thumbnail_dir, relpath)
if not os.path.exists(thumbnail_dir): if not os.path.exists(thumbnail_dir):
os.makedirs(thumbnail_dir) os.makedirs(thumbnail_dir)