Bug 172377 Moz doesn't properly handle cookies.txt / cookperm.txt symlinks

r=caillon sr=bz
This commit is contained in:
timeless%mozdev.org 2002-11-07 01:19:24 +00:00
parent c6d37749ae
commit 513a0ea872
2 changed files with 8 additions and 2 deletions

View File

@ -1879,7 +1879,10 @@ COOKIE_Write(nsIFile* dir) {
}
rv = dirSpec0->GetFileSpec(&dirSpec);
}
nsOutputFileStream strm(dirSpec + kCookiesFileName);
dirSpec += kCookiesFileName;
PRBool ignored;
dirSpec.ResolveSymlink(ignored);
nsOutputFileStream strm(dirSpec);
if (!strm.is_open()) {
/* file doesn't exist -- that's not an error */
return NS_OK;

View File

@ -439,7 +439,10 @@ Permission_Save(PRBool notify) {
if (NS_FAILED(rval)) {
return;
}
nsOutputFileStream strm(dirSpec + kCookiesPermFileName);
dirSpec += kCookiesPermFileName;
PRBool ignored;
dirSpec.ResolveSymlink(ignored);
nsOutputFileStream strm(dirSpec);
if (!strm.is_open()) {
return;
}