summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Iversen <teh.ivo@gmail.com>2016-01-30 08:45:51 +1100
committerMatt Iversen <teh.ivo@gmail.com>2016-01-30 08:45:51 +1100
commite263dd673e4559048eea948417cb2a0714a01aa4 (patch)
tree314a678dc4f6d55f1b39ddd868b34f883842dc80
parent351d2f499bdcb58020318db935344fe2adba52a6 (diff)
downloadvirtualenv-e263dd673e4559048eea948417cb2a0714a01aa4.tar.gz
Revert ac4ea65; only correct drive letter case.
Fixes #856, #815
-rw-r--r--docs/changes.rst2
-rwxr-xr-xvirtualenv.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/docs/changes.rst b/docs/changes.rst
index 4ff0719..028154a 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -4,6 +4,8 @@ Release History
14.1.0 (unreleased)
-------------------
+* Revert ac4ea65; only correct drive letter case.
+ Fixes :issue:`856`, :issue:`815`
14.0.3 (2016-01-28)
-------------------
diff --git a/virtualenv.py b/virtualenv.py
index c8148f5..8fb53f6 100755
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -975,10 +975,12 @@ def change_prefix(filename, dst_prefix):
prefixes.append(sys.base_prefix)
prefixes = list(map(os.path.expanduser, prefixes))
prefixes = list(map(os.path.abspath, prefixes))
- prefixes = list(map(os.path.normcase, prefixes))
# Check longer prefixes first so we don't split in the middle of a filename
prefixes = sorted(prefixes, key=len, reverse=True)
- filename = os.path.normcase(os.path.abspath(filename))
+ filename = os.path.abspath(filename)
+ # On Windows, make sure drive letter is uppercase
+ if is_win and filename[0] in 'abcdefghijklmnopqrstuvwxyz':
+ filename = filename[0].upper() + filename[1:]
for src_prefix in prefixes:
if filename.startswith(src_prefix):
_, relpath = filename.split(src_prefix, 1)