dirplex: Actually allow zero-argument index-file, as documented.
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 2 Mar 2014 00:25:34 +0000 (01:25 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 2 Mar 2014 00:25:34 +0000 (01:25 +0100)
src/dirplex/conf.c

index 76624a7..359bf0c 100644 (file)
@@ -255,9 +255,7 @@ struct config *readconfig(char *file)
            cf->patterns = pat;
        } else if(!strcmp(s->argv[0], "index-file")) {
            freeca(cf->index);
-           cf->index = NULL;
-           if(s->argc > 1)
-               cf->index = cadup(s->argv + 1);
+           cf->index = cadup(s->argv + 1);
        } else if(!strcmp(s->argv[0], "capture")) {
            if(s->argc < 2) {
                flog(LOG_WARNING, "%s:%i: missing argument to capture declaration", s->file, s->lno);