| 228 | } |
| 229 | |
| 230 | static void queue_directory(const struct object_id *oid, |
| 231 | struct strbuf *base, const char *filename, |
| 232 | unsigned mode, struct archiver_context *c) |
| 233 | { |
| 234 | struct directory *d; |
| 235 | size_t len = st_add4(base->len, 1, strlen(filename), 1); |
| 236 | d = xmalloc(st_add(sizeof(*d), len)); |
| 237 | d->up = c->bottom; |
| 238 | d->baselen = base->len; |
| 239 | d->mode = mode; |
| 240 | c->bottom = d; |
| 241 | d->len = xsnprintf(d->path, len, "%.*s%s/", (int)base->len, base->buf, filename); |
| 242 | oidcpy(&d->oid, oid); |
| 243 | } |
| 244 | |
| 245 | static int write_directory(struct archiver_context *c) |
| 246 | { |
no test coverage detected