diff options
| author | 2024-09-04 09:48:35 +0200 | |
|---|---|---|
| committer | 2024-09-04 09:48:35 +0200 | |
| commit | 6778350211aeae076be80393cbef637e0218ad49 (patch) | |
| tree | af2edb5302be580629b62a1a454463e142b90842 /data.c | |
| parent | Added some CSS styling to the list-of-lists. (diff) | |
| download | snac2-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.c | 8 |
1 files changed, 8 insertions, 0 deletions
| @@ -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 | ||