diff --git a/src/calibre/devices/prs505/driver.py b/src/calibre/devices/prs505/driver.py index fe1f987dc9..6b1f33818a 100644 --- a/src/calibre/devices/prs505/driver.py +++ b/src/calibre/devices/prs505/driver.py @@ -207,6 +207,10 @@ class PRS505(CLI, Device): self.report_progress((i+1) / float(len(paths)), _('Removing books from device...')) if os.path.exists(path): os.unlink(path) + try: + os.removedirs(os.path.dirname(path)) + except: + pass self.report_progress(1.0, _('Removing books from device...')) @classmethod