Skip to content
Permalink
Browse files

Fix JENKINS-12746

  • Loading branch information...
gboissinot committed Feb 13, 2012
1 parent 1df1729 commit b183fac8743092f6b49e7313ae6353c35ee6ce82
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/main/java/org/jenkinsci/plugins/envinject/service/PropertiesLoader.java
@@ -38,7 +38,7 @@
SortedProperties properties = new SortedProperties();
try {
String fileContent = Util.loadFile(propertiesFile);
fileContent = processWindowsFilePath(fileContent);
fileContent = processFilePath(fileContent);
String fileContentResolved = Util.replaceMacro(fileContent, currentEnvVars);
properties.load(new StringReader(fileContentResolved));
} catch (IOException ioe) {
@@ -63,7 +63,7 @@
throw new NullPointerException("The file content object must be set.");
}

content = processWindowsFilePath(content);
content = processFilePath(content);

Map<String, String> result = new LinkedHashMap<String, String>();
StringReader stringReader = new StringReader(content);
@@ -89,11 +89,10 @@ private String processProperty(Object prop) {
return String.valueOf(prop).trim();
}

private String processWindowsFilePath(String content) {
private String processFilePath(String content) {
if (content == null) {
return null;
}
content = content.replace("\\\\", "\\");
return content.replace("\\", "\\\\");
}

0 comments on commit b183fac

Please sign in to comment.
You can’t perform that action at this time.