mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 235797 bookmarks.html permissions always reset to 600
r=bsmedberg sr=bz
This commit is contained in:
parent
2258257e85
commit
6a227960ae
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user