From cbe1fd387dd29f1cc1ee782ee70d41e86aa28239 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 22 Aug 2023 12:31:15 +0200 Subject: [PATCH] After "rsync", compare etc/psa_tariff and /etc/psa_tariff, if they contain the same traiff-files (as they should). --- worker.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/worker.cpp b/worker.cpp index d6d4156..5de4171 100644 --- a/worker.cpp +++ b/worker.cpp @@ -1001,9 +1001,16 @@ bool Worker::syncCustomerRepositoryAndFS() { progress += 5; setProgress(progress); if (!error) { - setProgress(100); - emit replaceLast(QString("Sync customer environment with filesystem ..."), UPDATE_STEP_DONE); - return true; + // now check tariff-files in etc and /etc/psa_tariff + QDir dir1(QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/psa_tariff")); + QDir dir2("/etc/psa_tariff"); + if (Utils::sameFilesInDirs(dir1, dir2)) { + setProgress(100); + emit replaceLast(QString("Sync customer environment with filesystem ..."), UPDATE_STEP_DONE); + return true; + } else { + // TODO: send message to ISMAS + } } } }