Changeset 784 for trunk/zoo-project/zoo-kernel/service_internal_js.c
- Timestamp:
- Jun 29, 2016, 3:40:46 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_js.c
r781 r784 70 70 JS_MaybeGC(cx); 71 71 72 char ntmp[1024];73 getcwd(ntmp,1024);74 75 72 jsval *argv = JS_ARGV(cx,argv1); 76 73 int i=0; … … 78 75 for(i=0;i<argc;i++){ 79 76 char *filename = JSValToChar(cx,&argv[i]); 80 char *api0=(char*)malloc((strlen(ntmp)+strlen(filename)+2)*sizeof(char));81 sprintf(api0,"%s/%s",ntmp,filename);82 77 #ifdef JS_DEBUG 83 78 fprintf(stderr,"Trying to load %s\n",api0); 84 79 fflush(stderr); 85 80 #endif 86 JSObject *api_script1=loadZooApiFile(cx,JS_GetGlobalObject(cx),api0); 87 free(api0); 81 JSObject *api_script1=loadZooApiFile(cx,JS_GetGlobalObject(cx),filename); 88 82 } 89 83 JS_MaybeGC(cx); … … 175 169 map* tmpm1=getMap(request,"metapath"); 176 170 char ntmp[1024]; 177 getcwd(ntmp,1024); 171 map* cwdMap=getMapFromMaps(*main_conf,"main","servicePath"); 172 if(cwdMap!=NULL) 173 sprintf(ntmp,"%s",cwdMap->value); 174 else 175 getcwd(ntmp,1024); 178 176 179 177 /**
Note: See TracChangeset
for help on using the changeset viewer.