diff options
| author | default <nobody@localhost> | 2024-09-04 09:48:35 +0200 |
|---|---|---|
| committer | default <nobody@localhost> | 2024-09-04 09:48:35 +0200 |
| commit | 6778350211aeae076be80393cbef637e0218ad49 (patch) | |
| tree | af2edb5302be580629b62a1a454463e142b90842 /data.c | |
| parent | d8e77aca76c120ab5a55f97aa591501080c24ee2 (diff) | |
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) /* 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; } |