Closed Bug 376136 Opened 18 years ago Closed 1 year ago

extend nsIRDFRemoteDataSource Flush() and FlushTo() to take permissions parameter for the file we write to disk

Categories

(Core Graveyard :: RDF, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: moco, Unassigned)

References

Details

extend nsIRDFRemoteDataSource Flush() and FlushTo() to take permissions parameter for the file we write to disk dveditz writes: "It would be nice if the RDF consumer could specify the permissions for different files/uses, wouldn't it?" One way we could do this would be to add a param to Flush() and FlushTo(). another approach that would not require a change to the interface is to specificy it as a query string on the uri we pass to init() or flushTo(), like file://foo/bar/cheese/blah.rdf?perms=0600 if not specified, we'd default the perms to 0666 so this would not affect any existing code (like in seamonkey, see bug #375102 for details)
Actually, it would probably be best if we could default to using the user's umask as already discussed in the other bug.
Is this a real bug or an RFE? Like, do we have an existing caller that needs this?
You can't avoid using a user's umask... (well you could if you called chmod manually)
I doubt "flush" is the right place to specify the permissions. If the file is new then the consumer probably wanted to specify the permissions when they created/opened it. If the file already exists IMO we should preserve the existing file permissions (we have an nsIFile pointing right at it in flush, "if file.exists newperm = file.permissions" (converted to all the ugly C++ error checking)).
Severity: normal → enhancement
Product: Core → Core Graveyard
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.