Closed
Bug 682166
Opened 13 years ago
Closed 13 years ago
Allow absolute pathnames in js console read()
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla9
People
(Reporter: azakai, Assigned: azakai)
Details
Attachments
(1 file, 1 obsolete file)
586 bytes,
patch
|
cdleary
:
review+
|
Details | Diff | Splinter Review |
Currently the js console, when told to read('/usr/share/...') will try to read CURRENT_DIR//user/share (and fail) since it appends the parameter to the current directory. Attached is a patch that leaves absolute pathnames (starting with '/') alone. For comparison, v8 does that.
Attachment #555902 -
Flags: review?(cdleary)
Assignee | ||
Comment 1•13 years ago
|
||
(forgot -U 8, sorry)
Attachment #555902 -
Attachment is obsolete: true
Attachment #555902 -
Flags: review?(cdleary)
Attachment #555903 -
Flags: review?(cdleary)
Comment 2•13 years ago
|
||
Comment on attachment 555903 [details] [diff] [review] patch with context Review of attachment 555903 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/shell/js.cpp @@ +3805,5 @@ > > + if (*leaf == '/') { > + /* We were given an absolute pathname. */ > + return JS_strdup(cx, leaf); > + } Do we want to wrap this in an |#if !defined(XP_WIN)|?
Attachment #555903 -
Flags: review?(cdleary) → review+
Assignee | ||
Comment 3•13 years ago
|
||
MakeAbsolutePathname is actually only defined and used ifdef XP_UNIX. I guess no one uses the shell on Windows ;)
Assignee | ||
Comment 4•13 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/5a7e488482a5
Whiteboard: [inbound]
Comment 5•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/5a7e488482a5
Assignee: general → azakai
Status: NEW → RESOLVED
Closed: 13 years ago
Hardware: x86 → All
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla9
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•