Bug 682166 - Allow absolute pathnames in js console read(). r=cdleary

This commit is contained in:
Alon Zakai 2011-08-31 09:40:14 -07:00
Родитель 360ee8b8c5
Коммит e52b4cddeb
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -3808,6 +3808,11 @@ MakeAbsolutePathname(JSContext *cx, const char *from, const char *leaf)
char *dir;
const char *slash = NULL, *cp;
if (*leaf == '/') {
/* We were given an absolute pathname. */
return JS_strdup(cx, leaf);
}
cp = from;
while (*cp) {
if (*cp == '/') {