mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
568d49bac7
commit
2ab64729d8
@ -17,9 +17,7 @@ def splitext(path):
|
|||||||
return key, ext[1:].lower()
|
return key, ext[1:].lower()
|
||||||
|
|
||||||
def formats_ok(formats):
|
def formats_ok(formats):
|
||||||
if formats and (len(formats) > 1 or tuple(formats.iterkeys()) != ('opf',)):
|
return len(formats) > 0
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def path_ok(path):
|
def path_ok(path):
|
||||||
return not os.path.isdir(path) and os.access(path, os.R_OK)
|
return not os.path.isdir(path) and os.access(path, os.R_OK)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user