String / from left during dirname conversion

This commit is contained in:
shortcutme 2017-10-03 16:05:01 +02:00
parent 49d863fa54
commit d0f85f3d04
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -113,7 +113,7 @@ def unpackOnionAddress(packed):
# Return: data/site/content.json -> data/site/
def getDirname(path):
if "/" in path:
return path[:path.rfind("/") + 1]
return path[:path.rfind("/") + 1].lstrip("/")
else:
return ""