Closed Bug 908138 Opened 12 years ago Closed 4 years ago

[OS.File] Detect attempts to pass relative paths to file functions

Categories

(Toolkit Graveyard :: OS.File, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: Yoric, Unassigned)

References

Details

(Whiteboard: [Async:team][lang=js])

Attachments

(2 files, 1 obsolete file)

At the moment, we can pass any string as a path to the functions and methods of OS.File. Passing a relative path is a bad idea, as this is both fragile and generally not portable. We should detect any attempt to pass a relative path and throw an error.
Not sure why this was left open as the other had both discussion and CCs - copying those CCs here.
Whiteboard: [Async][mentor=Yoric][lang=js]
Severity: normal → minor
Whiteboard: [Async][mentor=Yoric][lang=js] → [Async:ready][mentor=Yoric][lang=js]
QA Contact: paolo.mozmail
Whiteboard: [Async:ready][mentor=Yoric][lang=js] → [Async:team][mentor=Yoric][lang=js]
Attached patch The patchSplinter Review
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Attachment #8361700 - Flags: review?(dteller)
Attachment #8361700 - Flags: review?(dteller) → review+
Is there anything missing before you can land that bug?
Flags: needinfo?(paolo.mozmail)
(In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from comment #4) > Is there anything missing before you can land that bug? Failures in tests that use relative directories: https://tbpl.mozilla.org/?tree=Try&rev=fd75d818fc60 I don't think I'll be able to work on fixing these in the immediate future.
Flags: needinfo?(paolo.mozmail)
Mentor: dteller
Whiteboard: [Async:team][mentor=Yoric][lang=js] → [Async:team][lang=js]
Attachment #8997730 - Attachment is obsolete: true
I've uploaded a rebased patch and started a tryserver build in case someone wants to take a look at the test failures: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d2ee0c818c41d183312ba667ce73e017d39f1d4d
Assignee: paolo.mozmail → nobody
Mentor: dteller
Status: ASSIGNED → NEW
Keywords: addon-compat
QA Contact: paolo.mozmail

IOUtils supersedes OS.File and does not support relative paths.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: