Redirect:write mangles file names on windows 2005-07-13 - By Brown, Charles
If I'm off topic, please let me know.
I'm trying to get redirect:write to put a file in a relative subdirectory, so I have the following
<redirect:write file="sub/dir/{@(protected)}.txt">
On linux, :write converts the relative file name into an absolute file name, but it works fine, and the file ends up where I want it.
/home/cbrown/workspace/sub/dir/myFile.txt
On windows, :write tries to convert the relative file name into an absolute file name, but gets it mangled into;
:C:\Documents and Settings\CBROWN\workspace\sub\dir\sub\dir\myFile.txt
Which has two problems. First, the initial colon (:) makes the filename illegal, causing a FileNotFoundException to be thrown. Second, the "sub\dir\" gets repeated, resulting in a bad path.
Any thoughts on avoiding this?
Thanks.
--CB
|
|