From b14b1abd4df74330a7598b28c821ce8896a990eb Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Fri, 4 May 2018 20:22:55 +1000 Subject: [PATCH] Make sure to include EDF files in the S9 DATALOG folder itself --- .../SleepLib/loader_plugins/resmed_loader.cpp | 13 ++++++++++--- sleepyhead/preferencesdialog.ui | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sleepyhead/SleepLib/loader_plugins/resmed_loader.cpp b/sleepyhead/SleepLib/loader_plugins/resmed_loader.cpp index ee26c6e5..afda7932 100644 --- a/sleepyhead/SleepLib/loader_plugins/resmed_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/resmed_loader.cpp @@ -1380,9 +1380,16 @@ int ResmedLoader::scanFiles(Machine * mach, const QString & datalog_path) #ifdef DEBUG_EFFICIENCY time.start(); #endif - QFileInfoList EDFfiles; QDir dir(datalog_path); + + // First list any EDF files in DATALOG folder + QStringList filter; + filter << "*.edf"; + dir.setNameFilters(filter); + QFileInfoList EDFfiles = dir.entryInfoList(); + + dir.setNameFilters(QStringList()); dir.setFilter(QDir::Dirs | QDir::Hidden | QDir::NoDotAndDotDot); QString filename; bool ok; @@ -2240,13 +2247,13 @@ void ResDayTask::run() sess->UpdateSummaries(); - // Save is not threadsafe? + // Save is not threadsafe? (meh... it seems to be) // loader->saveMutex.lock(); sess->Store(mach->getDataPath()); // loader->saveMutex.unlock(); loader->sessionMutex.lock(); - mach->AddSession(sess); + mach->AddSession(sess); // AddSession definitely ain't. loader->sessionMutex.unlock(); // Free the memory used by this session diff --git a/sleepyhead/preferencesdialog.ui b/sleepyhead/preferencesdialog.ui index e9604002..f91fbff8 100644 --- a/sleepyhead/preferencesdialog.ui +++ b/sleepyhead/preferencesdialog.ui @@ -57,7 +57,7 @@ - 1 + 6 @@ -2247,7 +2247,7 @@ p, li { white-space: pre-wrap; } - Which tab to open at startup. (Note: It will default to Profile if there is no open Profile) + <html><head/><body><p>Which tab to open on loading a profile. (Note: It will default to Profile if there is no open Profile)</p></body></html> Profile