Re: Gnu mail bug

Chris Burdess <[email protected]>
Newsgroups gmane.comp.java.classpath.extensions.javamail
Message-ID <[email protected]>
Countach wrote:
>>> The trouble is, this only allows for relative names. My original 
>>> patch checked for the leading '/' so that you could use relative or 
>>> absolute paths.
>>
>> The problem is that URLName.getFile returns paths that do not include 
>> the leading '/', unlike java.net.URL. Typically, in JavaMail 
>> applications, the mailbox is represented as a URLName rather than the 
>> user being able to specify the exact string to pass to getFolder(). 
>> We need a consistent way to treat file paths that doesn't depend on a 
>> leading '/' - if you have any suggestions they would be most welcome.
>
> I'm not sure I understand the problem. The name argument passed to 
> getFolder is pretty much just a string that can have any significance 
> necessary for that type of mail repository. It is not a URL. It is the 
> name argument that is checked to see if it starts with "/", not the 
> url nor the File.

The problem is, where does the string that gets passed to getFolder 
come from? In many JavaMail applications it comes from the getFile 
method of URLName, which cannot return a string that begins with "/".
-- 
Chris Burdess
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.