117 struct stat* request_stat_path(const char *path, Request *rq) { |
117 struct stat* request_stat_path(const char *path, Request *rq) { |
118 // TODO: reimplement with vfs support |
118 // TODO: reimplement with vfs support |
119 // TODO: use pool |
119 // TODO: use pool |
120 struct stat *s = malloc(sizeof(struct stat)); |
120 struct stat *s = malloc(sizeof(struct stat)); |
121 if(stat(path, s)) { |
121 if(stat(path, s)) { |
|
122 free(s); |
122 return NULL; |
123 return NULL; |
123 } |
124 } |
124 // TODO: statpath and staterror |
125 // TODO: statpath and staterror |
125 rq->finfo = s; |
126 rq->finfo = s; |
126 return s; |
127 return s; |