From 984bea503349c3994a71e25645b38f36b3be8d32 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Mon, 7 Jun 2010 15:51:55 +0100 Subject: [PATCH] Fix send_to_disc from devices --- src/calibre/gui2/device.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index 181d0c784b..64d3b9cc01 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -317,8 +317,10 @@ class DeviceManager(Thread): 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)