зеркало из https://github.com/mozilla/pjs.git
Fix #83568 - BASE tag inserted when downloading file to a local drive
r=adamlock, sr=rpotts
This commit is contained in:
Родитель
205a10e159
Коммит
7baf9c35e2
|
@ -660,6 +660,7 @@ void CBrowserView::OnFileSaveAs()
|
|||
CString strFullPath = cf.GetPathName(); // Will be like: c:\tmp\junk.htm
|
||||
char *pStrFullPath = strFullPath.GetBuffer(0); // Get char * for later use
|
||||
|
||||
BOOL bSaveAll = FALSE;
|
||||
CString strDataPath;
|
||||
char *pStrDataPath = NULL;
|
||||
if(cf.m_ofn.nFilterIndex == 2)
|
||||
|
@ -668,6 +669,8 @@ void CBrowserView::OnFileSaveAs()
|
|||
// user want to save the complete document including
|
||||
// all frames, images, scripts, stylesheets etc.
|
||||
|
||||
bSaveAll = TRUE;
|
||||
|
||||
int idxPeriod = strFullPath.ReverseFind('.');
|
||||
strDataPath = strFullPath.Mid(0, idxPeriod);
|
||||
strDataPath += "_files";
|
||||
|
@ -694,7 +697,10 @@ void CBrowserView::OnFileSaveAs()
|
|||
NS_NewLocalFile(pStrDataPath, TRUE, getter_AddRefs(dataPath));
|
||||
}
|
||||
|
||||
persist->SaveDocument(nsnull, file, dataPath);
|
||||
if(bSaveAll)
|
||||
persist->SaveDocument(nsnull, file, dataPath);
|
||||
else
|
||||
persist->SaveURI(nsnull, nsnull, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче