Skip to content

Commit

Permalink
WFLY-3809 Fix JBOSS_HOME path substitution on Windows.
Browse files Browse the repository at this point in the history
Given JBOSS_HOME=c:\foo\bar\baz, Windows VirtualFile.getPathName()
returns something like:

/c:/foo/bar/baz

This differs from File.getAbsolutePath() which is used elsewhere in JDR.
This caused an issue where $JBOSS_HOME was not being properly replaced
in the generated archive.
  • Loading branch information
jhjaggars committed Sep 3, 2014
1 parent 73f7656 commit 34238a6
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -121,7 +121,7 @@ public void add(InputStream is, String path) {
* @throws Exception
*/
public void add(VirtualFile file, InputStream is) throws Exception {
String name = "JBOSS_HOME" + file.getPathName().substring(this.jbossHome.length());
String name = "JBOSS_HOME" + file.getPhysicalFile().getAbsolutePath().substring(this.jbossHome.length());
this.add(is, name);
}

Expand Down

0 comments on commit 34238a6

Please sign in to comment.