summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2024-09-04 09:48:35 +0200
committerGravatar default2024-09-04 09:48:35 +0200
commit6778350211aeae076be80393cbef637e0218ad49 (patch)
treeaf2edb5302be580629b62a1a454463e142b90842 /data.c
parentAdded some CSS styling to the list-of-lists. (diff)
downloadsnac2-6778350211aeae076be80393cbef637e0218ad49.tar.gz
snac2-6778350211aeae076be80393cbef637e0218ad49.tar.xz
snac2-6778350211aeae076be80393cbef637e0218ad49.zip
If style.css does not exist, it's created with the default one.
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)
156 /* read (and drop) emojis.json, possibly creating it */ 156 /* read (and drop) emojis.json, possibly creating it */
157 xs_free(emojis()); 157 xs_free(emojis());
158 158
159 /* if style.css does not exist, create it */
160 xs *css_fn = xs_fmt("%s/style.css", srv_basedir);
161
162 if (mtime(css_fn) == 0) {
163 srv_log(xs_fmt("Writing style.css"));
164 write_default_css();
165 }
166
159 return ret; 167 return ret;
160} 168}
161 169