Fix library names becoming full paths when user is logged in

This commit is contained in:
Kovid Goyal 2017-05-15 13:01:04 +05:30
parent f1d24fc349
commit 04d4cb923c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -116,7 +116,7 @@ class LibraryBroker(object):
def allowed_libraries(self, filter_func): def allowed_libraries(self, filter_func):
with self: with self:
allowed_names = filter_func(os.path.basename(l) for l in self.lmap.itervalues()) allowed_names = filter_func(os.path.basename(l) for l in self.lmap.itervalues())
return OrderedDict(((lid, path) for lid, path in self.lmap.iteritems() if os.path.basename(path) in allowed_names)) return OrderedDict(((lid, self.library_map[lid]) for lid, path in self.lmap.iteritems() if os.path.basename(path) in allowed_names))
def __enter__(self): def __enter__(self):
self.lock.acquire() self.lock.acquire()