DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=21042>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=21042





------- Additional Comments From [EMAIL PROTECTED]  2006-07-28 19:29 -------
Jan, have you looked at my patch?

The following:
--------------------------------------------------------------------------------
        if (fileDirParameter != null) {
            String fileName = FileUtils.getRelativePath(baseDir, inFile);

            int lastDirSep = fileName.lastIndexOf("/");

            // so a dir+"/"+name would not result in an absolute path
            String dir  = (-1 == lastDirSep ) ? "." : fileName.substring(0,
lastDirSep);

            liaison.addParam(fileDirParameter, dir);
        }
--------------------------------------------------------------------------------
seems cheaper CPU-cycle wise than involving filesystem actions as in:
--------------------------------------------------------------------------------
        if (fileDirParameter != null) {
            String fileName = FileUtils.getRelativePath(baseDir, inFile);
            File file = new File(fileName);
            // Give always a slash as file separator, so the stylesheet could be
sure about that
            // Use '.' so a dir+"/"+name would not result in an absolute path
            liaison.addParam(fileDirParameter, (file.getParent()!=null) ?
file.getParent().replace('\\','/') : "." );
        }
--------------------------------------------------------------------------------


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to