Use relative_to(ROOT) explicitly.
This commit is contained in:
parent
993bd65020
commit
995dd3959f
1 changed files with 1 additions and 1 deletions
|
@ -455,7 +455,7 @@ def table_row(path, display_name=None, shaded=False):
|
|||
return row
|
||||
|
||||
def path_to_url(path):
|
||||
url = path.relative_path[2:]
|
||||
url = path.relative_to(ROOT_DIRECTORY, simple=True)
|
||||
url = url.replace(os.sep, '/')
|
||||
url = '/' + url
|
||||
url = urllib.parse.quote(url)
|
||||
|
|
Loading…
Reference in a new issue