When a file is dumped, the file descriptor is opened by scanfile(), so that
is the function which should close it (not dump_inode()).
file_size = dumpfile(fd, file_info, path, stat_buf);
file_info["size"] = encode_int(file_size);
file_size = dumpfile(fd, file_info, path, stat_buf);
file_info["size"] = encode_int(file_size);
if (file_size < 0)
return; // error occurred; do not dump file
if (file_size < 0)
return; // error occurred; do not dump file