mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Fix for 70396. Remove .na2 files after they are migrated. r/sr=sspitzer.
This commit is contained in:
parent
06be46ccb3
commit
8cb2efa058
@ -1944,14 +1944,14 @@ nsMessengerMigrator::migrateAddressBookPrefEnum(const char *aPref, void *aClosur
|
||||
rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(ab4xFile));
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv) && ab4xFile,"ab migration failed: failed to get profile dir");
|
||||
if (NS_FAILED(rv) || !ab4xFile) return;
|
||||
|
||||
rv = ab4xFile->AppendNative(nsDependentCString(abFileName));
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"ab migration failed: failed to append filename");
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
||||
// TODO: Change users of nsIFileSpec to nsIFile and avoid this.
|
||||
rv = NS_NewFileSpecFromIFile(ab4xFile, getter_AddRefs(ab4xFileSpec));
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
||||
rv = ab4xFileSpec->AppendRelativeUnixPath((const char *)abFileName);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"ab migration failed: failed to append filename");
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
||||
rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(tmpLDIFFile));
|
||||
if (NS_FAILED(rv) || !tmpLDIFFile) return;
|
||||
@ -2029,9 +2029,11 @@ nsMessengerMigrator::migrateAddressBookPrefEnum(const char *aPref, void *aClosur
|
||||
#ifdef DEBUG_AB_MIGRATION
|
||||
printf("remove the tmp file\n");
|
||||
#endif /* DEBUG_AB_MIGRATION */
|
||||
rv = ab4xFile->Remove(PR_FALSE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"failed to delete the na2 file");
|
||||
if (NS_FAILED(rv)) return;
|
||||
rv = tmpLDIFFile->Remove(PR_TRUE);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"failed to delete the temp ldif file");
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user