Skip to content

Commit

Permalink
common: added workaround for pathing at msys/mingw (Fixes #117)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelliavonau committed Jul 27, 2020
1 parent 46a5ced commit f6ad990
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmake_converter/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import re
import time
import ntpath
import sysconfig


import colorama

Expand Down Expand Up @@ -358,6 +360,11 @@ def insensitive_glob(path):
""" Searches given path case insensitive """
drive, path = os.path.splitdrive(path)

platform = sysconfig.get_platform()
if 'msys' in platform or 'mingw' in platform:
drive = path[:2]
path = path[2:]

def either(c):
return '[{}{}]'.format(c.lower(), c.upper()) if c.isalpha() else c
pattern = drive + ''.join(map(either, path))
Expand Down

0 comments on commit f6ad990

Please sign in to comment.