Closed
Bug 84738
Opened 23 years ago
Closed 23 years ago
leafName returns a wrong string [PATCH]
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla0.9.3
People
(Reporter: pete, Assigned: pete)
Details
Attachments
(6 files)
1.66 KB,
patch
|
Details | Diff | Splinter Review | |
1.82 KB,
patch
|
Details | Diff | Splinter Review | |
1.83 KB,
patch
|
Details | Diff | Splinter Review | |
1.84 KB,
patch
|
Details | Diff | Splinter Review | |
1.84 KB,
patch
|
Details | Diff | Splinter Review | |
1.92 KB,
patch
|
Details | Diff | Splinter Review |
leafName returns a wrong string after manipulation from parent. Output of Test: js> o; [xpconnect wrapped nsIFile @ 0x80972c8] js> o.path; /tmp js> o.leafName; tmp js> o.path; /tmp js> o.parent.path; / js> o.leafName; mp js> o.path; //mp js> You can assign this to me if you want and i'll take a look at it. --pete
Comment 1•23 years ago
|
||
Does not appear to be an XPCOM problem to me from the discription. Reassigning as reuqested. Thanks.
Assignee: kandrot → petejc
Comment 2•23 years ago
|
||
kandrot: Last I checked the implementations of nsIFile were in xpcom.
Assignee | ||
Comment 3•23 years ago
|
||
Assignee | ||
Comment 4•23 years ago
|
||
OK, This patch fixes the problem --pete
Assignee | ||
Comment 5•23 years ago
|
||
Setting Target to 0.9.3 --pete
Target Milestone: --- → mozilla0.9.3
Assignee | ||
Updated•23 years ago
|
Priority: -- → P3
Assignee | ||
Updated•23 years ago
|
Severity: normal → major
Assignee | ||
Comment 6•23 years ago
|
||
Test output after fix: js> o; [xpconnect wrapped nsIFile @ 0x814b678] js> o.path; /tmp js> o.parent.path; / js> o.path; /tmp js> o.parent.path; / js> r; [xpconnect wrapped nsIFile @ 0x814bcb0] js> r.path; / js> r.parent.path; / js> r.path; / js>
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Comment 7•23 years ago
|
||
Where is |orig| freed? nits: Why did the whitespace change on @@ -929,7 +930,7 @@ Use PRBool instead of bool. Even though I uses curly braces like you, the heathen owners don't: if (slashp == buffer) - slashp++; + { Zap that space between the "if" and "else": + + if(root) + mPath.Adopt(orig); + + else
Assignee | ||
Comment 8•23 years ago
|
||
Assignee | ||
Comment 9•23 years ago
|
||
Where is |orig| freed? See path #39511. . . nits: > Why did the whitespace change on @@ -929,7 +930,7 @@ This is a rsult of previous tabs that someone checked in. > Use PRBool instead of bool. Yes, forgot. It in now. > Even though I uses curly braces like you, the heathen owners don't: if (slashp == buffer) - slashp++; + { The curly braces are to accomondate the assignment of `root=PR_TRUE' I don't use curly braces for one liners either . . . ;-) > Zap that space between the "if" and "else": Zapped . . . --pete
Comment 10•23 years ago
|
||
nit: if thou brace "else", thou must not forsaken "if". spacing problem still is there (but I am not one to talk). Fix that and r=dougt
Assignee | ||
Comment 11•23 years ago
|
||
Assignee | ||
Comment 12•23 years ago
|
||
Assignee | ||
Comment 13•23 years ago
|
||
Comment 14•23 years ago
|
||
Looks good to me, but please change the brace style in the changes to match what's done in the rest of thise file, i.e.: if (...) { .. } and not: if (...) { ... } and also use 4-space indentation, just like the other code in that file does. Consistency with surrounding code overways correctness when it comes to whitespace useage since there is no correct way! :-) With that fixed, sr=jst
Comment 15•23 years ago
|
||
s/overways/overweighs/
Assignee | ||
Comment 16•23 years ago
|
||
Assignee | ||
Comment 17•23 years ago
|
||
I checked this in this morning resolving fixed --pete
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•