SublimeGtags
SublimeGtags copied to clipboard
For Sublime Text Build 3114 x64, it cannot works!!!!
The ERROR information is:
TypeError: environment can only contain strings
I have found that path.encode('utf-8')
causes this problem in the file D:...\Sublime Text\Data\Packages\SublimeGtags\gtags.py, it will convert the "F:/project" to b"F:/project":
class TagFile(object):
def _expand_path(self, path):
path = os.path.expandvars(os.path.expanduser(path))
if IS_WINDOWS:
path = path.encode('utf-8')
return path
So, I added this If statement if int(sublime.version()) < 3000:
:
class TagFile(object):
def _expand_path(self, path):
path = os.path.expandvars(os.path.expanduser(path))
if IS_WINDOWS:
if int(sublime.version()) < 3000:
path = path.encode('utf-8')
return path
NOW, it works fine~!
Great work! Thanks tianjun9 to fix this bug.