return errno == ENOENT ? 0 : -errno;
for (;;) {
- struct dirent buf, *de;
+ struct dirent *de;
+ union dirent_storage buf;
bool is_dir;
int r;
char *entry_path;
- r = readdir_r(d, &buf, &de);
+ r = readdir_r(d, &buf.de, &de);
if (r != 0) {
if (ret == 0)
ret = -r;
case CREATE_FILE:
case TRUNCATE_FILE:
+ r = write_one_file(i, i->path);
+ if (r < 0)
+ return r;
+ break;
case WRITE_FILE:
r = glob_item(i, write_one_file);
if (r < 0)