Modified version of nathan wykes' history patch.

git-svn-id: svn://10.0.0.236/trunk@1023 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt 1998-05-01 20:40:25 +00:00
parent b8ccf4eb84
commit d8dec8ac2b
2 changed files with 6 additions and 5 deletions

View File

@ -1114,7 +1114,7 @@ xp_FileName(const char * name, XP_FileType type, char* *myName)
case xpGlobalHistory:
newName = (char *) XP_ALLOC(_MAX_PATH);
// changed -- jonm to support multi-profile
sprintf(newName, "%s\\mozilla.hst", (const char *)theApp.m_UserDirectory);
sprintf(newName, "%s\\%s.hst", (const char *)theApp.m_UserDirectory, XP_AppName);
break;
case xpGlobalHistoryList:
newName = (char *) XP_ALLOC(_MAX_PATH);

View File

@ -2050,10 +2050,11 @@ int login_UpdateFilesToNewLocation(const char * path,CWnd *pParent,BOOL bCop
}
CString csHist = theApp.GetProfileString("History","History File","");
CString csFilename = CString(XP_AppName) + ".hst";
if (!csHist.IsEmpty()) {
csTmp = path;
csTmp += "\\mozilla.hst";
pDlg->StartFileUpdate("General Files","mozilla.hst");
csTmp += CString("\\") + csFilename;
pDlg->StartFileUpdate("General Files", (char*)(const char*)csFilename);
if (bCopyDontMove) {
WFE_CopyFile(csHist,csTmp);
} else {
@ -2063,8 +2064,8 @@ int login_UpdateFilesToNewLocation(const char * path,CWnd *pParent,BOOL bCop
} else {
if (!csMain.IsEmpty()) {
csTmp = path;
csTmp += "\\mozilla.hst";
pDlg->StartFileUpdate("General Files","mozilla.hst");
csTmp += CString("\\") + csFilename;
pDlg->StartFileUpdate("General Files",(char*)(const char*)csFilename);
WFE_CopyFile(csMain + "\\mozilla.hst" ,csTmp);
}
}