Fix a regression that broke adding of books from sub-folders if the folder contained only an opf file. Fixes #1411240 [Add books from subdirectories (One book per directory) problem](https://bugs.launchpad.net/calibre/+bug/1411240)

This commit is contained in:
Kovid Goyal 2015-01-16 08:57:09 +05:30
parent 568d49bac7
commit 2ab64729d8

View File

@ -17,9 +17,7 @@ def splitext(path):
return key, ext[1:].lower()
def formats_ok(formats):
if formats and (len(formats) > 1 or tuple(formats.iterkeys()) != ('opf',)):
return True
return False
return len(formats) > 0
def path_ok(path):
return not os.path.isdir(path) and os.access(path, os.R_OK)