- if (!create && !(new File(path).exists())) return null;
- ret = new FileBasedMailbox(new File(path));
- instances.put(path, (FileBasedMailbox)ret);
+ Log.error("n", "no match for " + path + " in " + instances.hashCode());
+ if (new File(path+".sqlite").exists())
+ ret = new SqliteMailbox(path+".sqlite");
+ else {
+ if (!create && !(new File(path).exists())) return null;
+ ret = new FileBasedMailbox(new File(path));
+ }
+ instances.put(path, (MailTree)ret);
+ Log.error("n", "filling " + path + " with " + instances.get(path));