os.path.commonprefix is suitable for any strings

This commit is contained in:
fonfon 2014-12-09 23:38:16 +01:00
parent 97fe5714e2
commit 0d2b454b6e

View File

@ -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):