diff --git a/python/helpers/pydev/pydevd_file_utils.py b/python/helpers/pydev/pydevd_file_utils.py index fdee755daf43..d3c568418605 100644 --- a/python/helpers/pydev/pydevd_file_utils.py +++ b/python/helpers/pydev/pydevd_file_utils.py @@ -42,6 +42,7 @@ from pydevd_constants import * #@UnusedWildImport +from _pydev_filesystem_encoding import getfilesystemencoding import os.path import sys import traceback @@ -72,6 +73,15 @@ PATHS_FROM_ECLIPSE_TO_PYTHON = [] normcase = os_normcase # May be rebound on set_ide_os + +def norm_case(filename): + filename = os_normcase(filename) + if IS_PY3K: + return filename + enc = getfilesystemencoding() + return filename.decode(enc).lower().encode(enc) + + def set_ide_os(os): ''' We need to set the IDE os because the host where the code is running may be @@ -82,7 +92,7 @@ def set_ide_os(os): if os == 'UNIX': normcase = lambda f:f #Change to no-op if the client side is on unix/mac. else: - normcase = os_normcase + normcase = norm_case # After setting the ide OS, apply the normcase to the existing paths.