# HG changeset patch # User Matti Hamalainen # Date 1670974758 -7200 # Node ID 66b9d7b861d1c4c5ab0a4202e79e196c0e34c350 # Parent 93d0e1547842f030dfcc6fb1cbb0edf57cdc68c7 Update to match the th_mkdir_path() API changes in th-libs. diff -r 93d0e1547842 -r 66b9d7b861d1 main.c --- a/main.c Wed Dec 07 13:20:25 2022 +0200 +++ b/main.c Wed Dec 14 01:39:18 2022 +0200 @@ -1270,11 +1270,12 @@ (void) buf; th_ioctx *ctx = NULL; int cfgfd = -1; - - if (!th_mkdir_path(setConfigDir, 0)) + int res; + + if ((res = th_mkdir_path(setConfigDir, 0)) != THERR_OK) { - printMsgQ(currWin, "Could not create configuration file directory '%s'.\n", - setConfigDir); + printMsgQ(currWin, "Could not create configuration file directory '%s': %s\n", + setConfigDir, th_error_str(res)); goto error; } @@ -2117,10 +2118,10 @@ if ((sdata.flags & TH_IS_WRITABLE) == 0) { #ifdef TH_PLAT_WINDOWS - if (!th_mkdir_path(optLogPath, 0)) + if ((ret = th_mkdir_path(optLogPath, 0)) != THERR_OK) { - THERR("Could not create log file directory '%s'.\n", - optLogPath); + THERR("Could not create log file directory '%s': %s\n", + optLogPath, th_error_str(ret)); goto err_exit; } #else @@ -2131,10 +2132,10 @@ } } else - if (!th_mkdir_path(optLogPath, 0)) + if ((ret = th_mkdir_path(optLogPath, 0)) != THERR_OK) { - THERR("Could not create log file directory '%s'.\n", - optLogPath); + THERR("Could not create log file directory '%s': %s\n", + optLogPath, th_error_str(ret)); goto err_exit; } }