summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp14
-rw-r--r--src/organizercore.cpp6
2 files changed, 14 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 02347ee3..41ce0eb5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -554,6 +554,20 @@ int runApplication(MOApplication &application, SingleInstance &instance,
return 1;
}
+ {
+ // log if there are any dmp files
+ const auto hasCrashDumps =
+ !QDir(QString::fromStdWString(organizer.crashDumpsPath()))
+ .entryList({"*.dmp"}, QDir::Files)
+ .empty();
+
+ if (hasCrashDumps) {
+ log::debug(
+ "there are crash dumps in '{}'",
+ QString::fromStdWString(organizer.crashDumpsPath()));
+ }
+ }
+
log::debug("initializing plugins");
PluginContainer pluginContainer(&organizer);
pluginContainer.loadPlugins();
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 9ceb149e..c585ba09 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -484,12 +484,6 @@ bool OrganizerCore::cycleDiagnostics()
removeOldFiles(path, "*.dmp", maxDumps, QDir::Time|QDir::Reversed);
}
- // log if there are any files left
- const auto files = QDir(path).entryList({"*.dmp"}, QDir::Files);
- if (!files.isEmpty()) {
- log::debug("there are crash dumps in '{}'", path);
- }
-
return true;
}