mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
os.path.commonprefix is suitable for any strings
This commit is contained in:
parent
97fe5714e2
commit
0d2b454b6e
@ -41,7 +41,6 @@ def mark_active_menuitem(menu, path):
|
||||
urlitem['active'] = False
|
||||
if not path.startswith(str(urlitem['url'])):
|
||||
continue
|
||||
# TODO: use a more suitable function instead of os.path.commonprefix
|
||||
match = os.path.commonprefix([urlitem['url'], path])
|
||||
|
||||
if len(match) > len(best_match):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user