Mercurial > hg > nnchat
changeset 714:66b9d7b861d1
Update to match the th_mkdir_path() API changes in th-libs.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 14 Dec 2022 01:39:18 +0200 |
parents | 93d0e1547842 |
children | 6d527b60fb02 |
files | main.c |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }