]> git.tuebingen.mpg.de Git - adu.git/commitdiff
Merge branch 'refs/heads/t/dbdir-fix'
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 14 Sep 2016 11:16:27 +0000 (13:16 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 14 Sep 2016 11:16:27 +0000 (13:16 +0200)
The topic branch started on 2016-06-02 and was cooking since
2016-06-24. It contains a single fix.

* refs/heads/t/dbdir-fix:
  Abort if neither --database-dir nor --base-dir is given.

Makefile
create.c

index 00ef9e84c27d9eaec5312792fee98ccbe8be32d1..58202a224a6634ed39288ccf3b44f263ee715fb7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@ adu.1: adu adu.1.inc
        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 > $@
index af5694c4cba8b4148d1b083b5307fb2240335a29..a3373db4ff5d975eb46161512ad8654518abe717 100644 (file)
--- a/create.c
+++ b/create.c
@@ -140,10 +140,9 @@ static int scan_dir(char *dirname, uint64_t *parent_dir_num)
        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))) {