mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-03-04 05:03:47 +01:00
Fix #4195 (Android driver problem (HTC Hero))
This commit is contained in:
parent
00a9d8bd16
commit
19c8d41c2e
1 changed files with 10 additions and 0 deletions
|
|
@ -60,6 +60,16 @@ def books(self, oncard=None, end_session=True):
|
|||
self.EBOOK_DIR_CARD_B if oncard == 'cardb' else \
|
||||
self.get_main_ebook_dir()
|
||||
|
||||
candidates = ebook_dir
|
||||
if isinstance(candidates, basestring):
|
||||
candidates = [candidates]
|
||||
for x in candidates:
|
||||
if os.path.exists(os.path.join(prefix, *(x.split('/')))):
|
||||
ebook_dir = x
|
||||
break
|
||||
if not isinstance(ebook_dir, basestring):
|
||||
ebook_dir = ebook_dir[0]
|
||||
|
||||
# Get all books in the ebook_dir directory
|
||||
if self.SUPPORTS_SUB_DIRS:
|
||||
for path, dirs, files in os.walk(os.path.join(prefix, ebook_dir)):
|
||||
|
|
|
|||
Loading…
Reference in a new issue