[QFJ-436] \\ characters are skipped from the directory name on Windows Created: 12/May/09  Updated: 15/Nov/12  Resolved: 05/Apr/10

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Default
Reporter: Charles Moulliard Assignee: Unassigned
Resolution: Not a bug Votes: 0
Labels: None


 Description   

Hi,

The appendReplacement methof of Matcher removes the backslash required under Windows to create the directory tree

private Pattern variablePattern = Pattern.compile("\\$

{(.+?)}

");

private String interpolate(String value) {

//"value"= "$

{servicemix.home}

/data/log/quickfix/files/server"

if (value == null || value.indexOf('$') == -1)

{ return value; }

StringBuffer buffer = new StringBuffer();
Matcher m = variablePattern.matcher(value);
while (m.find()) {
if (m.start() > 0 && value.charAt(m.start() - 1) == '
')

{ continue; }

String variable = m.group(1);
// variable = servicemix.home
String variableValue = variableValues.getProperty(variable);
// "variableValue"= "D:\\\\Dvlpt\\\\Java\\\\workspace-ganymede\\\\esb\\\\apache-servicemix-kernel-1.2.0-SNAPSHOT" ---> OK
if (variableValue != null)

{ m.appendReplacement(buffer, variableValue); "buffer.toString()"= "D:DvlptJavaworkspace-ganymedeesbapache-servicemix-kernel-1.2.0-SNAPSHOT" --> NOK }

}
m.appendTail(buffer);

return buffer.toString();

}



 Comments   
Comment by Steve Bate [ 10/Jan/10 ]

We are assuming the paths are in Java format rather than OS-specific format. This might be something we don't want to support. I'm open to suggestions.

Generated at Tue Jul 01 07:42:40 UTC 2025 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.