Closed
Bug 973931
Opened 11 years ago
Closed 11 years ago
[OS.File] makeDir should not fail if the directory is a root in the format "D:"
Categories
(Toolkit Graveyard :: OS.File, defect)
Tracking
(firefox27 wontfix, firefox28+ fixed, firefox29+ fixed, firefox30+ fixed, b2g-v1.3 fixed)
People
(Reporter: Paolo, Assigned: Paolo)
References
Details
Attachments
(1 file)
1.97 KB,
patch
|
Yoric
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Bug 960046 fixed makeDir for the root directory case, but not when the directory is specified without a trailing backslash on Windows.
I guess, but I couldn't verify, that changing this check for "absolute" to a check for "winDrive" can fix the issue:
http://mxr.mozilla.org/mozilla-central/source/toolkit/components/osfile/modules/osfile_win_front.jsm#467
Assignee | ||
Comment 1•11 years ago
|
||
This patch fixes the issue in bug 958899. I also removed a redundant test.
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Attachment #8380332 -
Flags: review?(dteller)
Assignee | ||
Comment 2•11 years ago
|
||
Tracking this bug in addition to bug 958899.
status-firefox27:
--- → affected
status-firefox28:
--- → affected
status-firefox29:
--- → affected
status-firefox30:
--- → affected
tracking-firefox28:
--- → ?
tracking-firefox29:
--- → ?
tracking-firefox30:
--- → ?
Updated•11 years ago
|
Comment 3•11 years ago
|
||
Comment on attachment 8380332 [details] [diff] [review]
The patch
Review of attachment 8380332 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with the comments below addressed
::: toolkit/components/osfile/modules/osfile_win_front.jsm
@@ +461,5 @@
> // This is always the case with root directories
> if( splitPath.components[splitPath.components.length - 1].length === 0 ) {
> splitPath.components.pop();
> }
> // One component and an absolute path implies a directory root.
Please fix the comment.
::: toolkit/components/osfile/tests/xpcshell/test_makeDir.js
@@ +63,1 @@
> }
I'd like to keep the second part of the test, to ensure that we're not breaking another important characteristic of makeDir.
Attachment #8380332 -
Flags: review?(dteller) → review+
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from comment #3)
> I'd like to keep the second part of the test, to ensure that we're not
> breaking another important characteristic of makeDir.
Isn't that already tested a few lines above?
Comment 5•11 years ago
|
||
Right, my bad.
Updated•11 years ago
|
Assignee | ||
Comment 6•11 years ago
|
||
Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 8380332 [details] [diff] [review]
The patch
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 958899
User impact if declined: Inability to download to a root directory like "D:"
Testing completed (on m-c, etc.): Tested locally, just landed on inbound
Risk to taking this patch (and alternatives if risky): Minimal, has regression tests
String or IDL/UUID changes made by this patch: None
Attachment #8380332 -
Flags: approval-mozilla-beta?
Attachment #8380332 -
Flags: approval-mozilla-aurora?
Comment 8•11 years ago
|
||
I am waiting for the patch to land in m-c before approving it.
Comment 9•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Updated•11 years ago
|
Attachment #8380332 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•11 years ago
|
Attachment #8380332 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
Flags: in-testsuite+
Updated•11 years ago
|
status-b2g-v1.3:
--- → fixed
Updated•2 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•