From 2fc3d083668319248c20a836d6a074c1097239ac Mon Sep 17 00:00:00 2001 From: LoudSnorer Date: Fri, 10 Nov 2023 02:40:06 -0500 Subject: [PATCH] Fix iBreeze Loader. Does not read months > 9. (Oct,nov,Dec) --- oscar/SleepLib/loader_plugins/resvent_loader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oscar/SleepLib/loader_plugins/resvent_loader.cpp b/oscar/SleepLib/loader_plugins/resvent_loader.cpp index 966fc12b..46e4b59c 100644 --- a/oscar/SleepLib/loader_plugins/resvent_loader.cpp +++ b/oscar/SleepLib/loader_plugins/resvent_loader.cpp @@ -249,8 +249,8 @@ void UpdateEvents(EventType event_type, const QMap } QString GetSessionFolder(const QString& dirpath, const QDate& session_date) { - const auto year_month_folder = QString::number(session_date.year()) + (session_date.month() > 10 ? "" : "0") + QString::number(session_date.month()); - const auto day_folder = (session_date.day() > 10 ? "" : "0") + QString::number(session_date.day()); + const auto year_month_folder = QString("%1%2").arg(session_date.year()).arg(session_date.month(),2,10,QLatin1Char('0')); + const auto day_folder = QString("%1").arg(session_date.day(),2,10,QLatin1Char('0')) ; const auto session_folder_path = dirpath + QDir::separator() + kResventTherapyFolder + QDir::separator() + kResventRecordFolder + QDir::separator() + year_month_folder + QDir::separator() + day_folder; return session_folder_path; }