Re: GnU mBox
Chris Burdess <[email protected]>
| Newsgroups | gmane.comp.java.classpath.extensions.javamail |
|---|---|
| Message-ID | <[email protected]> |
Countach wrote:
> I think that code I gave you has a bug. In
> MboxFolder.canonicalNameToLocal it first replaces "/" with the local
> separator, and then compares to "//". This code can never execute.
>
> The lines should be swapped....
>
> Like this.....
> if (name.startsWith("//"))
> {
> rtn = rtn.substring(2);
> }
> String rtn = name.replace('/', File.separatorChar);
>
> Not this....
>
> String rtn = name.replace('/', File.separatorChar);
> if (name.startsWith("//"))
> {
> rtn = rtn.substring(2);
> }
There's no conflict, because the value of the name variable is not
changed during replace(). But I agree it's confusing, so I've changed
the implementation of the method accordingly.
--
Chris Burdess