Commit 34d6c12
Fix main_ctx_init: increase MAX_PATH, remove premature dir creation, add config fallback
1. Increase MAX_PATH from 260 to 1024 to handle longer file paths
2. Remove premature hv_mkdir(logdir) and hlog_set_file() calls from
main_ctx_init to avoid creating directories before user customization
3. Add config file path fallback: run_dir/etc/prog.conf -> run_dir/prog.conf
-> /usr/local/etc/prog.conf -> /etc/prog.conf (Unix only for last two)
Co-authored-by: ithewei <26049660+ithewei@users.noreply.github.com>1 parent b15b816 commit 34d6c12
2 files changed
Lines changed: 32 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
90 | 117 | | |
91 | 118 | | |
92 | | - | |
93 | 119 | | |
94 | 120 | | |
95 | 121 | | |
| |||
0 commit comments