Closed Bug 26859 Opened 25 years ago Closed 25 years ago

nsLocalFile::Exists not consistent across platforms

Categories

(Core :: XPCOM, defect, P3)

x86
All
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: jband_mozilla, Assigned: blizzard)

Details

Attachments

(1 file)

nsLocalFile::Exists does wildly different things on different platforms with files that do not exist. The Unix version returns an error code. It *looks* like the Win and Mac code will return a 'false' out param as expected. Are there tests (especially platform parity tests) for this subsystem? This is exacly the kind of thing that you could test using JavaScript. What is the level of consistency of the other methods to these classes?
chris, can you take a look at this. jband, for javascript tests, look at: http://lxr.mozilla.org/seamonkey/source/xpcom/tests/utils/
Assignee: dougt → blizzard
Wasn't this fixed a while ago?
If you check for a file on unix and it doesn't exist, it throws an exception. I listed a whole bunch of bugs i found from js in the xpcom ng. Like append not working, read file not working etc. pete
$ cat /home/petejc/IO/foo299.dat This is line R This is line R This is line R fine creates this file no probs accept for the permissions: $ ls -l /home/petejc/IO/foo299.dat -rwxr-xr-x 1 petejc petejc 45 Feb 4 10:37 /home/petejc/IO/foo299.dat this is 755 permissions not 777 . . . the file is being created with this call: file.create(0,0777); now when i try to append to this file this is what happens: ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@This is line S This is line S This is line S It seems to be converting the old data to garbage. If you count the garbage characters i beleive they are the correct number of characters from the original text.
Attached file javascript test file:
Accepting the bug for more inspection and from what it sounds like, fixing.
Status: NEW → ASSIGNED
I've verified that nsIFile::Exists() works on Unix and doesn't throw any exceptions. I tested it by touching and deleting the file and trying file.exists() from xpcshell and it worked as expected.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Marking Verified per blizzard's last comment.
Status: RESOLVED → VERIFIED
Please ignore the spam. Changing address.
Assignee: blizzard → blizzard
Status: VERIFIED → NEW
bustage from my reassign
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
bustage from my reassign
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: