mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Check if no paths were found. Shouldn't happen, but worth the check.
This commit is contained in:
parent
03caaa0eeb
commit
5c92a9ab45
@ -428,6 +428,10 @@ class AddAction(object): # {{{
|
|||||||
d.exec_()
|
d.exec_()
|
||||||
return
|
return
|
||||||
paths = [p for p in view._model.paths(rows) if p is not None]
|
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
|
from calibre.gui2.add import Adder
|
||||||
self.__adder_func = partial(self._add_from_device_adder, on_card=None,
|
self.__adder_func = partial(self._add_from_device_adder, on_card=None,
|
||||||
model=view._model)
|
model=view._model)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user