--- a/dav/scfg.c Tue Sep 17 21:06:03 2019 +0200 +++ b/dav/scfg.c Tue Sep 17 21:21:36 2019 +0200 @@ -501,23 +501,30 @@ pushstrat = PUSH_STRATEGY_HASH; } } - } else if(xstreq(node->name, "symlinks")) { - uint32_t symlinkconfig = 0; - const char *delims = " ,\r\n"; - char *cmdstr = strdup(value); - char *s = strtok(cmdstr, delims); - while(s) { - if(!strcmp(s, "sync")) { - symlinkconfig |= SYNC_SYMLINK_SYNC; - } else if(!strcmp(s, "extern_nofollow")) { - symlinkconfig |= SYNC_SYMLINK_EXTERN_NOFOLLOW; - } else if(!strcmp(s, "intern_nofollow")) { - symlinkconfig |= SYNC_SYMLINK_INTERN_NOFOLLOW; - } - s = strtok(NULL, delims); + } else if(xstreq(node->name, "symlink-intern")) { + if(!value) { + print_error(node->line, "missing value"); + } else if(xstreq(value, "sync")) { + symlink |= SYNC_SYMLINK_SYNC; + } else if(xstreq(value, "follow")) { + // nothing, default + } else if(xstreq(value, "ignore")) { + symlink |= SYNC_SYMLINK_IGNORE_INTERN; + } else { + print_error(node->line, + "unknown value: %s\n", value); } - free(cmdstr); - symlink = symlinkconfig; + } else if(xstreq(node->name, "symlink-extern")) { + if(!value) { + print_error(node->line, "missing value"); + } else if(xstreq(value, "follow")) { + // nothing, default + } else if(xstreq(value, "ignore")) { + symlink |= SYNC_SYMLINK_IGNORE_EXTERN; + } else { + print_error(node->line, + "unknown value: %s\n", value); + } } else { print_error(node->line, "unknown directory config element: %s\n", node->name);