From e228f65119bef5ba2e0a26c0f9c53d5c3f131463 Mon Sep 17 00:00:00 2001 From: Arseniy-Movshev Date: Sun, 28 May 2023 14:08:57 +0100 Subject: Allow sensorlogd to set up its directory structure This code sets up all the paths used by sensorlogd before it is started --- daemon/sensorPlugins/stepCounter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'daemon/sensorPlugins/stepCounter.cpp') diff --git a/daemon/sensorPlugins/stepCounter.cpp b/daemon/sensorPlugins/stepCounter.cpp index 8bfed03..fe8370c 100644 --- a/daemon/sensorPlugins/stepCounter.cpp +++ b/daemon/sensorPlugins/stepCounter.cpp @@ -33,6 +33,8 @@ StepCounterPlugin::StepCounterPlugin(QObject *parent, int initInterval) : QDateTime currDateTime = QDateTime::currentDateTime(); + setupFilePath(sensorPathPrefix); + if (dayFileExists(sensorPathPrefix)) { QStringList lastLineData = fileGetPrevRecord(sensorPathPrefix); lastRecordTime = QDateTime::fromSecsSinceEpoch(lastLineData[0].toInt()); -- cgit v1.2.3-54-g00ecf