зеркало из https://github.com/mozilla/gecko-dev.git
Bug 682166 - Allow absolute pathnames in js console read(). r=cdleary
This commit is contained in:
Родитель
360ee8b8c5
Коммит
e52b4cddeb
|
@ -3808,6 +3808,11 @@ MakeAbsolutePathname(JSContext *cx, const char *from, const char *leaf)
|
||||||
char *dir;
|
char *dir;
|
||||||
const char *slash = NULL, *cp;
|
const char *slash = NULL, *cp;
|
||||||
|
|
||||||
|
if (*leaf == '/') {
|
||||||
|
/* We were given an absolute pathname. */
|
||||||
|
return JS_strdup(cx, leaf);
|
||||||
|
}
|
||||||
|
|
||||||
cp = from;
|
cp = from;
|
||||||
while (*cp) {
|
while (*cp) {
|
||||||
if (*cp == '/') {
|
if (*cp == '/') {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче