Skip to content

Commit

Permalink
Update normalize_paths replacement
Browse files Browse the repository at this point in the history
Signed-off-by: amorphousWaste <20346603+amorphousWaste@users.noreply.github.com>
  • Loading branch information
amorphousWaste authored and Jawabiscuit committed Sep 15, 2023
1 parent 489b7bc commit 0b5594c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/rezplugins/shell/gitbash.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,13 @@ def normalize_paths(self, value):
normalize_path() still does drive-colon replace also - it needs to
behave correctly if passed a string like C:\foo.
"""
def lowrepl(match):
if match:
return "/{}/".format(match.group(1).lower())

# C:\ ==> /c/
value2 = self._drive_regex.sub("/\\1/", value)

return super(GitBash, self).normalize_paths(value2)
value2 = self._drive_regex.sub(lowrepl, value).replace("\\", "/")
return value2


def register_plugin():
Expand Down

0 comments on commit 0b5594c

Please sign in to comment.