Bug 235797 bookmarks.html permissions always reset to 600

r=bsmedberg sr=bz
This commit is contained in:
timeless%mozdev.org 2004-02-27 16:03:26 +00:00
parent 2258257e85
commit 6a227960ae

View File

@ -5491,12 +5491,20 @@ nsBookmarksService::WriteBookmarks(nsIFile* aBookmarksFile,
return rv;
}
PRUint32 oldPermissions = 0600;
rv = aBookmarksFile->GetPermissions(&oldPermissions);
if (NS_FAILED(rv))
oldPermissions = 0600;
rv = tempFile->MoveTo(bookmarkParentDir, bookmarkLeafName);
if (NS_FAILED(rv))
{
#ifdef DESTROY_THE_ONLY_COMPLETE_BOOKMARKS_FILE
tempFile->Remove(PR_FALSE);
#endif
return rv;
}
aBookmarksFile->SetPermissions(oldPermissions);
}
mDirty = PR_FALSE;