diff --git a/xdebug/util.py b/xdebug/util.py index 95badb0..6ae56a1 100644 --- a/xdebug/util.py +++ b/xdebug/util.py @@ -45,7 +45,7 @@ def get_real_path(uri, server=False): try: # scheme:///path/file => scheme, /path/file # scheme:///C:/path/file => scheme, C:/path/file - transport, filename = uri.split(':///', 1) + transport, filename = uri.split(':///', 1) except: filename = uri @@ -53,7 +53,7 @@ def get_real_path(uri, server=False): uri = os.path.normpath(filename) # Pattern for checking if uri is a windows path - drive_pattern = re.compile(r'^[a-zA-Z]:[\\/]') + drive_pattern = re.compile(r'^(?:[a-zA-Z]:[\\/]|\\\\)') # Append leading slash if filesystem is not Windows if not drive_pattern.match(uri) and not os.path.isabs(uri):