summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'data.c')
-rw-r--r--data.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/data.c b/data.c
index bbd0e0c..7197320 100644
--- a/data.c
+++ b/data.c
@@ -156,6 +156,14 @@ int srv_open(const char *basedir, int auto_upgrade)
/* read (and drop) emojis.json, possibly creating it */
xs_free(emojis());
+ /* if style.css does not exist, create it */
+ xs *css_fn = xs_fmt("%s/style.css", srv_basedir);
+
+ if (mtime(css_fn) == 0) {
+ srv_log(xs_fmt("Writing style.css"));
+ write_default_css();
+ }
+
return ret;
}