Check if no paths were found. Shouldn't happen, but worth the check.

This commit is contained in:
Charles Haley 2010-06-18 12:35:23 +01:00
parent 03caaa0eeb
commit 5c92a9ab45

View File

@ -428,6 +428,10 @@ class AddAction(object): # {{{
d.exec_()
return
paths = [p for p in view._model.paths(rows) if p is not None]
if not paths or len(paths) == 0:
d = error_dialog(self, _('Add to library'), _('No book files found'))
d.exec_()
return
from calibre.gui2.add import Adder
self.__adder_func = partial(self._add_from_device_adder, on_card=None,
model=view._model)