Closed
Bug 1751085
Opened 3 years ago
Closed 3 years ago
PathUtils: Support detecting absolute paths
Categories
(Toolkit Graveyard :: OS.File, task, P1)
Toolkit Graveyard
OS.File
Tracking
(firefox98 fixed)
RESOLVED
FIXED
98 Branch
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: beth, Assigned: beth)
References
Details
Attachments
(1 file)
PathUtils needs support for determing if a path is absolute or not. Existing code like:
OS.Path.join(p1, p2)
will return p2
if both p1
and p2
are absolute paths. I don't think we should support this pattern explicitly, and instead should opt for:
PathUtils.isAbsolute(p2) ? p2 : PathUtils.joinRelative(p1, p2);
favouring explicitness over implicitness. It also makes PathUtils behave closer to nsIFile, which is what is implemented atop of.
Assignee | ||
Comment 1•3 years ago
|
||
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/44fc23167c2a Add PathUtils.isAbsolute() r=Gijs
Comment 3•3 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 3 years ago
status-firefox98:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
Updated•1 year ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•