Browse Source

keep case of env var keys the user has added

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1039413 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 14 years ago
parent
commit
c60459738b
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      src/main/org/apache/tools/ant/taskdefs/Execute.java

+ 2
- 4
src/main/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -672,12 +672,10 @@ public class Execute {
if (osEnv.remove(key) == null && environmentCaseInSensitive) { if (osEnv.remove(key) == null && environmentCaseInSensitive) {
// not found, maybe perform a case insensitive search // not found, maybe perform a case insensitive search


// Nb: using default locale as key is a env name
key = key.toLowerCase();

for (Iterator it = osEnv.keySet().iterator(); it.hasNext(); ) { for (Iterator it = osEnv.keySet().iterator(); it.hasNext(); ) {
String osEnvItem = (String) it.next(); String osEnvItem = (String) it.next();
if (osEnvItem.toLowerCase().equals(key)) {
// Nb: using default locale as key is a env name
if (osEnvItem.toLowerCase().equals(key.toLowerCase())) {
// Use the original casiness of the key // Use the original casiness of the key
key = osEnvItem; key = osEnvItem;
break; break;


Loading…
Cancel
Save