Closed Bug 55723 Opened 24 years ago Closed 23 years ago

nsIFile isExecutable() lies and is wrong

Categories

(Core :: XPCOM, defect, P3)

x86
FreeBSD
defect

Tracking

()

RESOLVED INVALID
mozilla1.0

People

(Reporter: pete, Assigned: blizzard)

Details

Ex:

js> const FilePath=new Components.Constructor( "@mozilla.org/file/local;1",
"nsILocalFile", "initWithPath");
js> var f=new FilePath('/home/petejc/foo');
js> f.permissions;
420
js> f.isExecutable();
true

This is an utter lie, the above file is *not* executable . . .

--pete
Target Milestone: --- → mozilla1.0
You can reassign this to me since i'm doing a bunch of stuff in nsIFile lately.

--pete
I looked into this and found that running from root, the libc access call will
always return 0. When i su'd to a local user and tested the came code, the
access modes worked fine.

Chris can you mark this invalid?

Thanks

--pete
OK.
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.