mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
...
This commit is contained in:
parent
de6fe272ea
commit
f140e00316
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user