Deal with leading backslash, too

This commit is contained in:
Jamie Bliss 2016-08-28 23:34:11 -04:00
parent d8bc83cd51
commit 2e24b9a698

View file

@ -198,7 +198,7 @@ class Vox(collections.abc.Mapping):
env_path = builtins.__xonsh_env__['VIRTUAL_ENV'] env_path = builtins.__xonsh_env__['VIRTUAL_ENV']
if env_path.startswith(self.venvdir): if env_path.startswith(self.venvdir):
name = env_path[len(self.venvdir):] name = env_path[len(self.venvdir):]
if name[0] == '/': if name[0] in '/\\':
name = name[1:] name = name[1:]
return name return name
else: else: