Added direction to srv_archive() files.

This commit is contained in:
default 2022-09-26 12:10:11 +02:00
parent fd6f71bfe3
commit 57325b09f7

2
snac.c
View file

@ -143,7 +143,7 @@ void srv_archive(char *direction, char *req, char *payload, int p_size,
{ {
/* obsessive archiving */ /* obsessive archiving */
xs *date = tid(0); xs *date = tid(0);
xs *dir = xs_fmt("%s/archive/%s", srv_basedir, date); xs *dir = xs_fmt("%s/archive/%s_%s", srv_basedir, date, direction);
FILE *f; FILE *f;
if (mkdir(dir, 0755) != -1) { if (mkdir(dir, 0755) != -1) {