Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xdebug/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ 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

# Normalize path for comparison and remove duplicate/trailing slashes
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):
Expand Down