This commit is contained in:
Kovid Goyal 2015-12-16 10:35:33 +05:30
parent de6fe272ea
commit f140e00316

View File

@ -146,14 +146,12 @@ def all_known_libraries():
paths.add(prefs['library_path']) paths.add(prefs['library_path'])
added = set() added = set()
for path in paths: for path in paths:
mdb = os.path.join(path) mdb = os.path.join(path, 'metadata.db')
if os.path.isdir(path) and os.path.exists(mdb): if os.path.exists(mdb):
seen = False
for c in added: for c in added:
if samefile(mdb, c): if samefile(mdb, os.path.join(c, 'metadata.db')):
seen = True
break break
if not seen: else:
added.add(path) added.add(path)
return added return added