mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Handle the case where only a drive is given for the translation. Fixes #770
This commit is contained in:
parent
b1ad4d66f1
commit
83b18ef703
2 changed files with 9 additions and 0 deletions
|
|
@ -218,6 +218,8 @@ if sys.platform == 'win32':
|
|||
parts = parts.lower().split(os.path.sep)
|
||||
|
||||
try:
|
||||
if parts == ['']:
|
||||
return drive
|
||||
return _resolve_listing(drive, iter(parts))
|
||||
except FileNotFoundError:
|
||||
_listdir_cache.clear()
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
|
|||
import io
|
||||
from _pydev_bundle.pydev_log import log_context
|
||||
import pytest
|
||||
import sys
|
||||
|
||||
|
||||
def test_convert_utilities(tmpdir):
|
||||
|
|
@ -99,6 +100,12 @@ def test_source_reference(tmpdir):
|
|||
assert pydevd_file_utils.get_server_filename_from_source_reference(source_reference) == '/another/my'
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform != 'win32', reason='Windows-only test.')
|
||||
def test_translate_only_drive():
|
||||
import pydevd_file_utils
|
||||
assert pydevd_file_utils.get_path_with_real_case('c:\\') == 'C:\\'
|
||||
|
||||
|
||||
def test_to_server_and_to_client(tmpdir):
|
||||
try:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue