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


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Additional Comments From [EMAIL PROTECTED]  2006-08-11 19:32 -------
(In reply to comment #31)
> 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('\\','/') : "." );
>         }
> --------------------------------------------------------------------------------
> 

Jan, could you please comment why you used the file approach instead of the
String operation? Thanks.

-- 
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