diff options
author | Mateusz Moscicki <m.moscicki2@partner.samsung.com> | 2021-03-25 11:13:42 +0100 |
---|---|---|
committer | Mateusz Moscicki <m.moscicki2@partner.samsung.com> | 2021-03-25 11:29:26 +0100 |
commit | b4b208ae8f0e0f2ca455eb8a6776515aea439743 (patch) | |
tree | af1c9661d2d54ec1e19691f0bb3dd6b54fa93ef7 | |
parent | 540f9ba97eab345c8e55e56dde2dfe1521f5d871 (diff) | |
download | crash-worker-b4b208ae8f0e0f2ca455eb8a6776515aea439743.tar.gz crash-worker-b4b208ae8f0e0f2ca455eb8a6776515aea439743.tar.bz2 crash-worker-b4b208ae8f0e0f2ca455eb8a6776515aea439743.zip |
bugreport-service uses the default crash_root_path when there is no config file
Change-Id: If5d6b0b0323576a27e115a407c3130a2bac2111f
-rw-r--r-- | src/bugreport-service/diagnostics/diagnostics.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bugreport-service/diagnostics/diagnostics.c b/src/bugreport-service/diagnostics/diagnostics.c index defee17..ebce15f 100644 --- a/src/bugreport-service/diagnostics/diagnostics.c +++ b/src/bugreport-service/diagnostics/diagnostics.c @@ -379,10 +379,13 @@ int diagnostics_report_get_file(const char *report_path, assert(report_path); config_t config; - if (!config_init(&config, CRASH_MANAGER_CONFIG_PATH)) - return -BR_ERR_INTERNAL; + char *crash_root_path = NULL; + if (config_init(&config, CRASH_MANAGER_CONFIG_PATH)) + crash_root_path = config.crash_root_path; + else + crash_root_path = CRASH_ROOT_PATH; - bool is_report = is_report_file(report_path, config.crash_root_path); + bool is_report = is_report_file(report_path, crash_root_path); config_free(&config); if (!is_report) { |