From bbe09b35aaaffc5f22da5e11749a3d19494698b4 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Tue, 20 Oct 2015 08:50:20 +0200 Subject: [PATCH] use .otrw for waypoints dump --- README.md | 2 +- recorder.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f7e7a9c..876ba69 100644 --- a/README.md +++ b/README.md @@ -306,7 +306,7 @@ As mentioned earlier, data is stored in files, and these files are relative to ` * `msg/` contains messages received by the Messaging system. * `photos/` optional; contains the binary photos from a _card_. * `rec/` the recorder data proper. One subdirectory per user, one subdirectory therein per device. Data files are named `YYYY-MM.rec` (e.g. `2015-08.rec` for the data accumulated during the month of August 2015. -* `waypoints/` contains a directory per user and device. Therein are individual files named by a timestamp with the JSON payload of published (i.e. shared) waypoints. The file names are timestamps because the `tst` of a waypoint is its key. If a user publishes all waypoints from a device (Publish Waypoints), the payload is stored in this directory as `dump.json`. +* `waypoints/` contains a directory per user and device. Therein are individual files named by a timestamp with the JSON payload of published (i.e. shared) waypoints. The file names are timestamps because the `tst` of a waypoint is its key. If a user publishes all waypoints from a device (Publish Waypoints), the payload is stored in this directory as `username-device.otrw`. (Note, that this is the JSON waypoints import format.) You should definitely **not** modify or touch these files: they remain under the control of the _recorder_. You can of course, remove old `.rec` files if they consume too much space. diff --git a/recorder.c b/recorder.c index 6c1809e..56360f5 100644 --- a/recorder.c +++ b/recorder.c @@ -343,7 +343,7 @@ void waypoints_dump(struct udata *ud, UT_string *username, UT_string *device, ch return; } - utstring_printf(ts, "/dump.json"); + utstring_printf(ts, "/%s-%s.otrw", UB(username), UB(device)); if (ud->verbose) { printf("Received waypoints dump, storing at %s\n", UB(ts)); }