mirror of
https://github.com/owntracks/recorder.git
synced 2026-08-27 16:57:21 +00:00
handle file basename differently depending on prefix
cards etc were being stored in YYYYMM.json; now username.json
This commit is contained in:
@@ -74,8 +74,13 @@ FILE *pathn(char *mode, char *prefix, UT_string *user, UT_string *device, char *
|
||||
}
|
||||
#endif
|
||||
|
||||
time(&now);
|
||||
utstring_printf(path, "/%s.%s", yyyymm(now), suffix);
|
||||
if (strcmp(prefix, "rec") == 0) {
|
||||
time(&now);
|
||||
utstring_printf(path, "/%s.%s", yyyymm(now), suffix);
|
||||
} else {
|
||||
utstring_printf(path, "/%s.%s",
|
||||
utstring_body(user), suffix);
|
||||
}
|
||||
|
||||
ut_clean(path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user