Mercurial > hg > nnchat
comparison main.c @ 686:256002aa06cc
Changed to conform to new th_stat_path() API.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 09 Jul 2018 07:28:45 +0300 |
parents | ceb73b712121 |
children | e6d60eacf24d |
comparison
equal
deleted
inserted
replaced
685:fc79f5f4b4d6 | 686:256002aa06cc |
---|---|
2085 setHomeDir, SET_DIR_SEPARATOR, SET_LOG_DIR, SET_DIR_SEPARATOR); | 2085 setHomeDir, SET_DIR_SEPARATOR, SET_LOG_DIR, SET_DIR_SEPARATOR); |
2086 } | 2086 } |
2087 | 2087 |
2088 if (optLogEnable) | 2088 if (optLogEnable) |
2089 { | 2089 { |
2090 int flags; | 2090 th_stat_data sdata; |
2091 if (th_stat_path(optLogPath, &flags)) | 2091 if (th_stat_path(optLogPath, &sdata)) |
2092 { | 2092 { |
2093 if ((flags & TH_IS_DIR) == 0) | 2093 if ((sdata.flags & TH_IS_DIR) == 0) |
2094 { | 2094 { |
2095 THERR("The log file path '%s' is not a directory.\n", | 2095 THERR("The log file path '%s' is not a directory.\n", |
2096 optLogPath); | 2096 optLogPath); |
2097 goto err_exit; | 2097 goto err_exit; |
2098 } | 2098 } |
2099 else | 2099 else |
2100 if ((flags & TH_IS_WRITABLE) == 0) | 2100 if ((sdata.flags & TH_IS_WRITABLE) == 0) |
2101 { | 2101 { |
2102 #ifdef TH_PLAT_WINDOWS | 2102 #ifdef TH_PLAT_WINDOWS |
2103 if (!th_mkdir_path(optLogPath, 0)) | 2103 if (!th_mkdir_path(optLogPath, 0)) |
2104 { | 2104 { |
2105 THERR("Could not create log file directory '%s'.\n", | 2105 THERR("Could not create log file directory '%s'.\n", |