mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 17:43:38 +02:00
Fix send_to_disc from devices
This commit is contained in:
parent
359946bd08
commit
984bea5033
1 changed files with 3 additions and 1 deletions
|
|
@ -317,8 +317,10 @@ def remove_books_from_metadata(self, paths, booklists):
|
|||
def _save_books(self, paths, target):
|
||||
'''Copy books from device to disk'''
|
||||
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)
|
||||
print path, dest
|
||||
if os.path.abspath(dest) != os.path.abspath(path):
|
||||
f = open(dest, 'wb')
|
||||
self.device.get_file(path, f)
|
||||
|
|
|
|||
Loading…
Reference in a new issue