Closed
Bug 26859
Opened 25 years ago
Closed 25 years ago
nsLocalFile::Exists not consistent across platforms
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: jband_mozilla, Assigned: blizzard)
Details
Attachments
(1 file)
5.98 KB,
text/plain
|
Details |
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?
Comment 1•25 years ago
|
||
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
Assignee | ||
Comment 2•25 years ago
|
||
Wasn't this fixed a while ago?
Comment 3•25 years 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
Comment 4•25 years ago
|
||
$ 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.
Comment 5•25 years ago
|
||
Assignee | ||
Comment 6•25 years ago
|
||
Accepting the bug for more inspection and from what it sounds like, fixing.
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•25 years ago
|
||
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
Assignee | ||
Comment 9•25 years ago
|
||
Please ignore the spam. Changing address.
Assignee: blizzard → blizzard
Status: VERIFIED → NEW
Assignee | ||
Comment 10•25 years ago
|
||
bustage from my reassign
Status: NEW → RESOLVED
Closed: 25 years ago → 25 years ago
You need to log in
before you can comment on or make changes to this bug.
Description
•