Check library sources before adding
New sources should: 1) Be a string 2) Not already be a tracked source
This commit is contained in:
parent
86494f7f7f
commit
8a0baf6693
|
@ -211,7 +211,10 @@ def is_visible(id):
|
|||
|
||||
def add_source(path):
|
||||
global sources
|
||||
sources.append(path)
|
||||
if path.__class__ == unicode:
|
||||
path = str(path)
|
||||
if path not in sources:
|
||||
sources.append(path)
|
||||
|
||||
def scan(path):
|
||||
add_source(path)
|
||||
|
|
Loading…
Reference in New Issue