Fixed situation where mbox files exist outside thunderbird directory

This commit is contained in:
Alex Ebadirad 2012-06-21 16:43:19 -07:00
parent f3c7d549aa
commit d472d15a6b

View File

@ -127,17 +127,22 @@ public class ThunderbirdMboxFileIngestService implements IngestServiceAbstractFi
} }
int index = 0; int index = 0;
String replace = ""; String replace = "";
boolean a = mboxPath.indexOf("/ImapMail/") > 0;
boolean b = mboxPath.indexOf("/Mail/") > 0; boolean b = mboxPath.indexOf("/Mail/") > 0;
if(b == true) if(b == true)
{ {
index = mboxPath.indexOf("/Mail/"); index = mboxPath.indexOf("/Mail/");
replace = "/Mail"; replace = "/Mail";
} }
else else if(a == true)
{ {
index = mboxPath.indexOf("/ImapMail/"); index = mboxPath.indexOf("/ImapMail/");
replace = "/ImapMail"; replace = "/ImapMail";
} }
else{
replace = "";
}
String folderPath = mboxPath.substring(index); String folderPath = mboxPath.substring(index);
folderPath = folderPath.replaceAll(replace, ""); folderPath = folderPath.replaceAll(replace, "");
folderPath = folderPath+mboxName; folderPath = folderPath+mboxName;