classpathx-javamail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-javamail] Re: Gnu mail bug


From: Chris Burdess
Subject: [Classpathx-javamail] Re: Gnu mail bug
Date: Mon, 21 Feb 2005 09:03:21 +0000

Countach wrote:
You seem to have changed my patch resulting in a bug.

My patch said:

 protected MboxFolder(MboxStore store, String name, boolean inbox)
 {
   super(store);
   this.name = name;
   if (0 < name.length() && name.charAt(0) == '/') {
     file = new File(canonicalNameToLocal(name));
   } else {
file = new File(store.getMailRootDir(), canonicalNameToLocal(name));
   }


But the cvs code seems to say:

 protected MboxFolder(MboxStore store, String name, boolean inbox)
 {
   super(store);
   this.name = name;
   file = new File(store.getMailRootDir(), canonicalNameToLocal(name));

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.
--
Chris Burdess





reply via email to

[Prev in Thread] Current Thread [Next in Thread]