MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / _fix_path

Function _fix_path

pydevd_file_utils.py:653–668  ·  view source on GitHub ↗
(path, sep, add_end_sep=False)

Source from the content-addressed store, hash-verified

651
652
653def _fix_path(path, sep, add_end_sep=False):
654 if path.startswith("."):
655 # We need the full path if this relative because all other comparisons
656 # check if the path is substring of another
657 path = os.path.abspath(path)
658
659 if add_end_sep:
660 if not path.endswith("/") and not path.endswith("\\"):
661 path += "/"
662 else:
663 if path.endswith("/") or path.endswith("\\"):
664 path = path[:-1]
665
666 if sep != "/":
667 path = path.replace("/", sep)
668 return path
669
670
671_last_client_server_paths_set = []

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected