diff --git a/oscar/SleepLib/loader_plugins/resmed_loader.cpp b/oscar/SleepLib/loader_plugins/resmed_loader.cpp index 973e8ce4..b732905a 100644 --- a/oscar/SleepLib/loader_plugins/resmed_loader.cpp +++ b/oscar/SleepLib/loader_plugins/resmed_loader.cpp @@ -1051,6 +1051,13 @@ int ResmedLoader::scanFiles(Machine * mach, const QString & datalog_path) // Forget about it if it can't be read. if (!fi.isReadable()) { + qWarning() << fi.fileName() << "is unreadable and has been ignored"; + continue; + } + + // Skip empty files + if (fi.size() == 0) { + qWarning() << fi.fileName() << "is empty and has been ignored"; continue; }