aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/config.c b/config.c
index bc9eed6..d99cc2c 100644
--- a/config.c
+++ b/config.c
@@ -28,7 +28,7 @@
#include <errno.h>
unsigned short port = 0;
-char *tmpl_path = NULL, *root = NULL;
+char *tmpl_path = NULL, *root = NULL, *subdir = NULL;
int
config_load(const char *conf_path)
@@ -39,10 +39,6 @@ config_load(const char *conf_path)
return -1;
}
- //fseek(cfgf , 0, SEEK_END);
- //size_t cfgsize = ftell(cfgf);
- //rewind(cfgf);
-
printf("config:\n");
char line[256];
@@ -75,6 +71,10 @@ config_load(const char *conf_path)
value[strlen(value) - 1] = '\0';
root = strdup(value);
printf("\troot: %s\n", root);
+ } else if (strcmp(line, "subdir") == 0) {
+ value[strlen(value) - 1] = '\0';
+ subdir = strdup(value);
+ printf("\tsubdir: %s\n", subdir);
} else {
fprintf(stderr, "[config] unknown key: %s\n", line);
continue;