Mercurial > hg > nnchat
comparison main.c @ 558:e32881ece842 dev-1_3_0
Only try to create log directories if logging is enabled.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 13 Nov 2012 01:06:58 +0200 |
parents | 02244c553741 |
children | 1b2d434a651b |
comparison
equal
deleted
inserted
replaced
557:02244c553741 | 558:e32881ece842 |
---|---|
1862 { | 1862 { |
1863 optLogPath = th_strdup_printf("%s%c%s%c", | 1863 optLogPath = th_strdup_printf("%s%c%s%c", |
1864 setHomeDir, SET_DIR_SEPARATOR, SET_LOG_DIR, SET_DIR_SEPARATOR); | 1864 setHomeDir, SET_DIR_SEPARATOR, SET_LOG_DIR, SET_DIR_SEPARATOR); |
1865 } | 1865 } |
1866 | 1866 |
1867 if (optLogEnable) | |
1867 { | 1868 { |
1868 BOOL isDir, isWritable, isReadable; | 1869 BOOL isDir, isWritable, isReadable; |
1869 if (nn_stat_path(optLogPath, &isDir, &isWritable, &isReadable)) | 1870 if (nn_stat_path(optLogPath, &isDir, &isWritable, &isReadable)) |
1870 { | 1871 { |
1871 if (!isDir) | 1872 if (!isDir) |