mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
Ensure url is a str for commonprefix
Fixes #1064. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
00d8e03d90
commit
21494f5615
@ -42,7 +42,7 @@ def mark_active_menuitem(menu, path):
|
||||
if not path.startswith(str(urlitem['url'])):
|
||||
continue
|
||||
|
||||
match = os.path.commonprefix([urlitem['url'], path])
|
||||
match = os.path.commonprefix([str(urlitem['url']), path])
|
||||
if len(match) > len(best_match):
|
||||
best_match = match
|
||||
best_match_item = urlitem
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user