diff options
author | Wojtek Kosior <koszko@koszko.org> | 2021-07-22 17:21:16 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2021-07-22 17:21:16 +0200 |
commit | f5b0a89729e85736a87aa310aafe11f5807f3428 (patch) | |
tree | be6fb514cf909f0d29a402b32ed6fc6145572f0d /main.c | |
parent | b6ace6eda12140c29ee58ec9178b9212b21fa538 (diff) | |
download | hydrilla-f5b0a89729e85736a87aa310aafe11f5807f3428.tar.gz hydrilla-f5b0a89729e85736a87aa310aafe11f5807f3428.zip |
bugfixes
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -80,7 +80,7 @@ static int process_scriptbase_subdir(struct scriptbase *base, static int prepare_scriptbase_from_dir(const char *dir_path, struct scriptbase *base) { - DIR *maindir; + DIR *maindir = NULL; struct dirent *subdir; struct stringbuf path_buf; struct stringbuf json_buf; @@ -91,11 +91,11 @@ static int prepare_scriptbase_from_dir(const char *dir_path, stringbuf_init(&path_buf); stringbuf_init(&json_buf); - maindir = opendir(dir_path); - if (!maindir) + if (scriptbase_init(base, "https://hydrilla.koszko.org/resources")) goto end; - if (scriptbase_init(base, "https://hydrilla.koszko.org/resources")) + maindir = opendir(dir_path); + if (!maindir) goto end; if (sb_sprintf(&path_buf, "%s/", dir_path)) |