Fix bug in JsonDB.list_docs when folder doesn't exist

pull/2/head
Noah 2015-07-20 14:10:09 -07:00
부모 8786b8d49c
커밋 bf18978195
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제

파일 보기

@ -112,6 +112,9 @@ def list_docs(path, recursive=False):
root = os.path.join(Config.db.db_root, path)
docs = list()
if not os.path.isdir(root):
return []
for item in sorted(os.listdir(root)):
target = os.path.join(root, item)
db_path = os.path.join(path, item)