Closed Bug 193814 Opened 23 years ago Closed 23 years ago

on windows, use SetFileAttributes instead of chmod

Categories

(Core :: XPCOM, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: dougt, Assigned: dougt)

References

()

Details

Reading the some postings regarding chmod() vs. _chmod() vs. G|SetFileAttributes, I think that we should be using the later. more info needed.
Would SetFileAttribute be any better? The nsIFile chooses to use the Unix style chmod flags as its model. The Windows version of chmod only works for owner, and doesn't work for user or group. I think you could implement the user flags, but not sure about the group. I don't think SetFileAttribute is going to add anything that would help this implementation. Actaully I think it supports less than what chmod supports currently. Working with the security API in Windows is always fun. Implementing the user and possibly the group isn't going to be trivial.
what David Bradley said: Window's version of chmod, which is how this is implemented, only supports the owner flags, 0400, 0200, and 0100. If you're trying to use any of the other flags it's probably going to ignore them.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.