Was cooking for nine months...
* refs/heads/t/fchdir-warning-fix:
fd.c: Avoid gcc warning regarding fchdir().
man2html $< | sed -e 's|^<DT><DD>$$|<DT><DD><br>|g' > $@
clean:
- rm -f *.o adu *cmdline.c *cmdline.h adu.1 adu.1.html adu.png index.html adu.sk~
+ rm -f *.o adu *cmdline.c *cmdline.h adu.1 adu.1.html index.html
index.html: adu.1.html index.html.in INSTALL README
sed -e '/@README@/,$$d' index.html.in > $@
if (conf.database_dir_given)
tmp = adu_strdup(conf.database_dir_arg);
- else
+ else {
+ if (!conf.base_dir_arg) {
+ EMERG_LOG("fatal: neither database dir "
+ "nor base dir given\n");
+ exit(EXIT_FAILURE);
+ }
tmp = make_message("%s%s",
conf.database_root_arg, conf.base_dir_arg);
+ }
/*
* As we change the cwd during database creation, database_dir
* must be an absolute path.
check_signals();
DEBUG_LOG("----------------- %llu: %s\n", (long long unsigned)current_dir_num, dirname);
ret = adu_opendir(dirname, &dir, &cwd_fd);
- if (ret < 0) {
- if (ret != -ERRNO_TO_ERROR(EACCES))
- return ret;
- WARNING_LOG("permission denied for %s\n", dirname);
+ if (ret < 0) { /* Non-fatal, continue with next dir */
+ WARNING_LOG("skipping dir %s: %s\n", dirname,
+ adu_strerror(-ret));
return 1;
}
while ((entry = readdir(dir))) {