# HG changeset patch # User Ludovic Chabant # Date 1412023928 25200 # Node ID 15d317805c584219a5ebe194a9e63fb608101123 # Parent 19a377f4e962a87a93965d72080d5badfc37f1b8 Fix finding wiki roots on Windows. diff -r 19a377f4e962 -r 15d317805c58 wikked/utils.py --- a/wikked/utils.py Mon Sep 29 07:26:17 2014 -0700 +++ b/wikked/utils.py Mon Sep 29 13:52:08 2014 -0700 @@ -5,6 +5,7 @@ from xml.sax.saxutils import escape, unescape +re_terminal_path = re.compile(r'[/\\]|(\w\:)') endpoint_regex = re.compile(r'(\w[\w\d]*)\:(.*)') strip_endpoint_regex = re.compile(r'^(\w[\w\d]+)\:') @@ -42,7 +43,7 @@ os.path.isdir(os.path.join(path, '.hg'))): return path path = os.path.dirname(path) - if not path or path == '/': + if not path or re_terminal_path.match(path): break return None