src/server/daemon/acl.c

changeset 93
95b77e842db3
parent 73
79fa26ecd135
child 100
e9bb8449df02
equal deleted inserted replaced
92:382bff43c6eb 93:95b77e842db3
319 } 319 }
320 sstr_t wd = sstr(cwd); 320 sstr_t wd = sstr(cwd);
321 sstr_t pp = sstr(path); 321 sstr_t pp = sstr(path);
322 p.length = wd.length + pp.length + 1; 322 p.length = wd.length + pp.length + 1;
323 p.ptr = malloc(p.length + 1); 323 p.ptr = malloc(p.length + 1);
324 p = sstrncat(3, p, wd, sstrn("/", 1), pp); 324 p = sstrncat(p, 3, wd, sstrn("/", 1), pp);
325 p.ptr[p.length] = '\0'; 325 p.ptr[p.length] = '\0';
326 } else { 326 } else {
327 p = sstrdup(sstr(path)); 327 p = sstrdup(sstr(path));
328 } 328 }
329 if(p.ptr[p.length-1] == '/') { 329 if(p.ptr[p.length-1] == '/') {

mercurial