From 9805bb4784a90a6dac745a01bbac3c401917cfa2 Mon Sep 17 00:00:00 2001 From: Jesse McCarthy Date: Fri, 14 Nov 2014 10:26:36 -0500 Subject: [PATCH 1/2] Modify drive_pattern regex to recognize UNC paths (leading "\\"). Fix #118. --- xdebug/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdebug/util.py b/xdebug/util.py index 95badb0..0411bf7 100644 --- a/xdebug/util.py +++ b/xdebug/util.py @@ -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): From 97f942c9fb70948fdb3c5a8364f7bc34982c963f Mon Sep 17 00:00:00 2001 From: Jesse McCarthy Date: Fri, 14 Nov 2014 10:27:36 -0500 Subject: [PATCH 2/2] Remove trailing whitespace. --- xdebug/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdebug/util.py b/xdebug/util.py index 0411bf7..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