mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix send_to_disc from devices
This commit is contained in:
parent
359946bd08
commit
984bea5033
@ -317,8 +317,10 @@ class DeviceManager(Thread):
|
|||||||
def _save_books(self, paths, target):
|
def _save_books(self, paths, target):
|
||||||
'''Copy books from device to disk'''
|
'''Copy books from device to disk'''
|
||||||
for path in paths:
|
for path in paths:
|
||||||
name = path.rpartition(getattr(self.device, 'path_sep', '/'))[2]
|
# name = path.rpartition(getattr(self.device, 'path_sep', '/'))[2]
|
||||||
|
name = path.rpartition(os.sep)[2]
|
||||||
dest = os.path.join(target, name)
|
dest = os.path.join(target, name)
|
||||||
|
print path, dest
|
||||||
if os.path.abspath(dest) != os.path.abspath(path):
|
if os.path.abspath(dest) != os.path.abspath(path):
|
||||||
f = open(dest, 'wb')
|
f = open(dest, 'wb')
|
||||||
self.device.get_file(path, f)
|
self.device.get_file(path, f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user