core: Switch to neater handling of paths

This commit is contained in:
Thomas Adamcik 2014-01-14 00:24:17 +01:00
parent 82584eb21a
commit 62ad6d1de2

View File

@ -83,8 +83,8 @@ class LibraryController(object):
result = []
for ref in refs:
if ref.type == Ref.DIRECTORY:
result.append(
ref.copy(uri='/%s%s' % (library_name, ref.uri)))
uri = '/'.join(['', library_name, ref.uri.lstrip('/')])
result.append(ref.copy(uri=uri))
else:
result.append(ref)
return result