This could cause some entries to be skipped until we regained sync,
especially in the root directory.
#include <algorithm>
#include <assert.h>
#include <algorithm>
#include <assert.h>
#include <chrono>
#include <getopt.h>
#include <iosfwd>
#include <chrono>
#include <getopt.h>
#include <iosfwd>
// TODO: Care about the base path.
string path = read_cstr(fp);
// TODO: Care about the base path.
string path = read_cstr(fp);
+
+ if (fseek(fp, ntohl(hdr.conf_size), SEEK_CUR) != 0) {
+ perror("skip conf block");
+ exit(1);
+ }
+
while (!feof(fp)) {
handle_directory(fp, receiver);
}
while (!feof(fp)) {
handle_directory(fp, receiver);
}