From afd57c3fe1aab6556880e238847997fef3f9cf5c Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 9 Feb 2021 20:31:44 +0100 Subject: [PATCH] - settings: load scan defaults before save scan.conf Signed-off-by: Thilo Graf --- src/system/settings.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/system/settings.cpp b/src/system/settings.cpp index 5ea31f7a5..edeab92e1 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -22,6 +22,7 @@ */ #include +#include #include #include @@ -186,6 +187,10 @@ bool CScanSettings::loadSettings(const char * const fileName) bool CScanSettings::saveSettings(const char * const fileName) { + // get sure we got initialized variables + if (access(fileName, R_OK) != 0) + loadSettings(fileName); + configfile.setInt32("bouquetMode", bouquetMode); configfile.setInt32("scanType", scanType);