[Opensource] FileUtil.getExtension
Michael Rimov
rimovm at centercomp.com
Mon Nov 17 15:01:19 PST 2003
Fixed in CVS. Thanks for the fix! As a side note, there's a couple of
other fixes and unit tests for several FileUtil functions now in CVS too.
-Mike
At 10:59 PM 11/11/2003, you wrote:
>Hi
>
>getExtension function is not working correctly
>if the file name contains more as one dot.
>It is because the function looks for first dot in a file name and not the last
>one.
>
>for example myfile.name.doc will return name.doc
>instead of doc.
>
>just simply change of code
>
> while (st.hasMoreTokens()){
> ext = st.nextToken();
> }
> return ext;
>
>should work.
>
>regards
>juris
>
>_______________________________________________
>Opensource mailing list
>Opensource at jcorporate.com
>http://mail.jcorporate.com/mailman/listinfo/opensource
>Archives: http://mail.jcorporate.com/pipermail/opensource/
More information about the Opensource
mailing list