Bug #268034 --> Mail imported from Mozilla 1.x dumps messages in wrong mailboxes

when migrating mozilla profiles with multiple servers with the same host name, we should make
sure our hostname based diretory is unique.

sr=bienvenu
This commit is contained in:
scott%scott-macgregor.org 2004-11-08 23:18:18 +00:00
Родитель e1326c2c32
Коммит e9533f85d9
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -618,6 +618,11 @@ nsresult nsSeamonkeyProfileMigrator::CopyMailFolders(nsVoidArray* aMailServers,
nsXPIDLCString hostName;
serverBranch->GetCharPref("hostname", getter_Copies(hostName));
targetMailFolder->Append(NS_ConvertASCIItoUCS2(hostName));
// we should make sure the host name based directory we are going to migrate
// the accounts into is unique. This protects against the case where the user
// has multiple servers with the same host name.
targetMailFolder->CreateUnique(nsIFile::DIRECTORY_TYPE, 0777);
}
rv = RecursiveCopy(sourceMailFolder, targetMailFolder);