Kobo driver: Show a warning when the user tries to export/view .kobo files

This commit is contained in:
Kovid Goyal 2010-07-30 11:01:58 -06:00
parent 61009628cb
commit 9b7053cda1

View File

@ -355,3 +355,16 @@ class KOBO(USBMS):
# print "Internal: " + filename
return path
def get_file(self, path, *args, **kwargs):
tpath = self.munge_path(path)
extension = os.path.splitext(tpath)[1]
if extension == '.kobo':
from calibre.devices.errors import UserFeedback
raise UserFeedback(_("Not Implemented"),
_('".kobo" files do not exist on the device but are rows in the sqlitedatabase. '
'Currently they cannot be exported or viewed.'),
UserFeedback.WARN)
return USBMS.get_file(self, path, *args, **kwargs)