Skip to content
Snippets Groups Projects
Commit 6bd18786 authored by rswindell's avatar rswindell
Browse files

js_CreateFileAreaObject now supports NULL user parameter (no user).

parent 8fbd7d04
Branches
Tags
No related merge requests found
......@@ -88,7 +88,7 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
for(l=0;l<cfg->total_libs;l++) {
if(!chk_ar(cfg,cfg->lib[l]->ar,user))
if(user!=NULL && !chk_ar(cfg,cfg->lib[l]->ar,user))
continue;
if((libobj=JS_NewObject(cx, &js_file_area_class, NULL, NULL))==NULL)
......@@ -119,7 +119,7 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
for(d=0;d<cfg->total_dirs;d++) {
if(cfg->dir[d]->lib!=l)
continue;
if(!chk_ar(cfg,cfg->dir[d]->ar,user))
if(user!=NULL && !chk_ar(cfg,cfg->dir[d]->ar,user))
continue;
if((dirobj=JS_NewObject(cx, &js_file_area_class, NULL, NULL))==NULL)
......@@ -147,7 +147,7 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
return(NULL);
if(!JS_GetArrayLength(cx, dir_list, &index)) /* inexplicable exception here on Jul-6-2001 */
return(NULL);
return(NULL); /* and again on Aug-7-2001 and Oct-21-2001 */
val=OBJECT_TO_JSVAL(dirobj);
JS_SetElement(cx, dir_list, index, &val);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment