From 4adc13c5f8ef6ae26c0946c97eb79b168b4f6ba8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 21 Aug 2023 22:59:24 +0200 Subject: [PATCH] kdb2mt: do not abort with SIGSEGV when --src-mbox is used Fixes: gromox-1.36-10-gd241f9afc References: DESK-1201 --- tools/kdb2mt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/kdb2mt.cpp b/tools/kdb2mt.cpp index 7dded4ee7..0517d6bd4 100644 --- a/tools/kdb2mt.cpp +++ b/tools/kdb2mt.cpp @@ -1560,7 +1560,9 @@ int main(int argc, const char **argv) "You probably wanted to redirect output into a file or pipe.\n"); return EXIT_FAILURE; } - ret = do_database(std::move(drv), g_srcguid != nullptr ? g_srcguid : g_srcmbox); + ret = do_database(std::move(drv), g_srcguid != nullptr ? g_srcguid : + g_srcmro != nullptr ? g_srcmro : + g_srcmbox != nullptr ? g_srcmbox : "Strange Mailbox"); } catch (const char *e) { fprintf(stderr, "kdb2mt: Exception: %s\n", e); return -ECANCELED;