summaryrefslogtreecommitdiff
path: root/virtualenv.py
diff options
context:
space:
mode:
authorMatt Iversen <teh.ivo@gmail.com>2016-02-01 10:33:18 +1100
committerMatt Iversen <teh.ivo@gmail.com>2016-02-01 10:33:18 +1100
commit733586aa2a58ea9fd268b45911a75d0df2d7452d (patch)
treefb8dc4629d42415553e1d902450c9ca86421d3c3 /virtualenv.py
parent9f1fbe7dd9a35a71aecc1f9ee497df195a1dc817 (diff)
downloadvirtualenv-733586aa2a58ea9fd268b45911a75d0df2d7452d.tar.gz
Homogenize drive letter casing for both prefixes and filenames.
Diffstat (limited to 'virtualenv.py')
-rwxr-xr-xvirtualenv.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/virtualenv.py b/virtualenv.py
index 8fb53f6..15069e8 100755
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -981,6 +981,9 @@ def change_prefix(filename, dst_prefix):
# On Windows, make sure drive letter is uppercase
if is_win and filename[0] in 'abcdefghijklmnopqrstuvwxyz':
filename = filename[0].upper() + filename[1:]
+ for i, prefix in enumerate(prefixes):
+ if is_win and prefix[0] in 'abcdefghijklmnopqrstuvwxyz':
+ prefixes[i] = prefix[0].upper() + prefix[1:]
for src_prefix in prefixes:
if filename.startswith(src_prefix):
_, relpath = filename.split(src_prefix, 1)