mirror of
https://github.com/owntracks/recorder.git
synced 2026-08-23 11:26:16 +00:00
remove otrw on kill
This commit is contained in:
@@ -1076,6 +1076,13 @@ JsonNode *kill_datastore(char *user, char *device)
|
||||
}
|
||||
globfree(&results);
|
||||
|
||||
utstring_renew(path);
|
||||
utstring_printf(path, "%s/waypoints/%s/%s/%s-%s.otrw", STORAGEDIR, user, device, user, device);
|
||||
if (remove(UB(path)) == 0) {
|
||||
olog(LOG_NOTICE, "removed %s", UB(path));
|
||||
json_append_member(obj, "otrw", json_mkstring(UB(path)));
|
||||
}
|
||||
|
||||
utstring_renew(path);
|
||||
utstring_printf(path, "%s/waypoints/%s/%s", STORAGEDIR, user, device);
|
||||
if (rmdir(UB(path)) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user