make it so the user has there 4.x bookmarks after migration.

This commit is contained in:
sspitzer%netscape.com 1999-09-18 19:32:52 +00:00
parent 78f4b21b83
commit 17c449e494
2 changed files with 10 additions and 2 deletions

View File

@ -918,7 +918,7 @@ nsPrefMigration::DoSpecialUpdates(nsFileSpec profilePath)
// rename the bookmarks file, but only if we need to.
rv = Rename4xFileAfterMigration(profilePath,BOOKMARKS_FILE_NAME_IN_4x,BOOKMARKS_FILE_NAME_IN_5x);
if (NS_FAILED(rv)) return rv;
#ifdef MAIL_FILTER_FILE_NAME_SUFFIX_IN_4x
rv = RenameAndMoveFilterFiles(profilePath);
if (NS_FAILED(rv)) return rv;

View File

@ -86,6 +86,8 @@
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
#include "nsIBookmarksService.h"
#define _MAX_LENGTH 256
#define _MAX_NUM_PROFILES 50
@ -123,7 +125,7 @@ static PRBool renameCurrProfile = PR_FALSE;
// IID and CIDs of all the services needed
static NS_DEFINE_CID(kProfileCID, NS_PROFILE_CID);
static NS_DEFINE_CID(kBookmarksCID, NS_BOOKMARKS_SERVICE_CID);
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
static NS_DEFINE_CID(kFileLocatorCID, NS_FILELOCATOR_CID);
static NS_DEFINE_CID(kRegistryCID, NS_REGISTRY_CID);
@ -1932,6 +1934,12 @@ NS_IMETHODIMP nsProfile::StartCommunicator(const char* profileName)
}
// we need to re-read the bookmarks here, other wise the user
// won't have there 4.x bookmarks until after they exit and come back
NS_WITH_SERVICE(nsIBookmarksService, bookmarks, kBookmarksCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = bookmarks->ReadBookmarks();
return rv;
}