Closed
Bug 682166
Opened 15 years ago
Closed 15 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•15 years ago
|
||
(forgot -U 8, sorry)
Attachment #555902 -
Attachment is obsolete: true
Attachment #555902 -
Flags: review?(cdleary)
Attachment #555903 -
Flags: review?(cdleary)
Comment 2•15 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•15 years ago
|
||
MakeAbsolutePathname is actually only defined and used ifdef XP_UNIX. I guess no one uses the shell on Windows ;)
| Assignee | ||
Comment 4•15 years ago
|
||
Whiteboard: [inbound]
Comment 5•15 years ago
|
||
Assignee: general → azakai
Status: NEW → RESOLVED
Closed: 15 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
•