diff options
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git/util.py b/git/util.py index e55f15d3..6a4a6557 100644 --- a/git/util.py +++ b/git/util.py @@ -310,7 +310,7 @@ def _cygexpath(drive: Optional[str], path: str) -> str: else: p = cygpath(p) elif drive: - p = "/cygdrive/%s/%s" % (drive.lower(), p) + p = "/proc/cygdrive/%s/%s" % (drive.lower(), p) p_str = str(p) # ensure it is a str and not AnyPath return p_str.replace("\\", "/") @@ -334,7 +334,7 @@ def cygpath(path: str) -> str: """Use :meth:`git.cmd.Git.polish_url()` instead, that works on any environment.""" path = str(path) # ensure is str and not AnyPath. # Fix to use Paths when 3.5 dropped. or to be just str if only for urls? - if not path.startswith(("/cygdrive", "//")): + if not path.startswith(("/cygdrive", "//", "/proc/cygdrive")): for regex, parser, recurse in _cygpath_parsers: match = regex.match(path) if match: @@ -348,7 +348,7 @@ def cygpath(path: str) -> str: return path -_decygpath_regex = re.compile(r"/cygdrive/(\w)(/.*)?") +_decygpath_regex = re.compile(r"(?:/proc)?/cygdrive/(\w)(/.*)?") def decygpath(path: PathLike) -> str: |