Bug 335308 r=annie.sullivan Exported bookmarks are not readable by 1.5

This commit is contained in:
brettw%gmail.com 2006-04-24 23:30:34 +00:00
Родитель bbd74d43e6
Коммит 3bdf60ea07
1 изменённых файлов: 0 добавлений и 17 удалений

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

@ -1114,8 +1114,6 @@ static char kFileIntro[] =
"<!DOCTYPE NETSCAPE-Bookmark-file-1>" NS_LINEBREAK
// Note: we write bookmarks in UTF-8
"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">" NS_LINEBREAK
"<META NAME=\"date\" CONTENT=\"";
static char kFileIntro2[] = "\">" NS_LINEBREAK NS_LINEBREAK
"<TITLE>Bookmarks</TITLE>" NS_LINEBREAK;
static const char kRootIntro[] = "<H1";
static const char kCloseRootH1[] = "</H1>" NS_LINEBREAK NS_LINEBREAK;
@ -1624,21 +1622,6 @@ nsNavBookmarks::ExportBookmarksHTML(nsIFile* aBookmarksFile)
rv = strm->Write(kFileIntro, sizeof(kFileIntro)-1, &dummy);
if (NS_FAILED(rv)) return rv;
// generated time
PRExplodedTime time;
PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &time);
char timeBuf[128];
PRUint32 ret = PR_FormatTime(timeBuf, sizeof(timeBuf),
"%a, %d %b %Y %H:%M:%S %z", &time);
if (ret > 0 && ret < sizeof(timeBuf)) {
rv = strm->Write(timeBuf, strlen(timeBuf), &dummy);
if (NS_FAILED(rv)) return rv;
}
// rest of file header
rv = strm->Write(kFileIntro2, sizeof(kFileIntro2)-1, &dummy);
if (NS_FAILED(rv)) return rv;
// '<H1'
rv = strm->Write(kRootIntro, sizeof(kRootIntro)-1, &dummy); // <H1
if (NS_FAILED(rv)) return rv;