Repository navigation
Commit d00a84e
Fix log cleanup for bare relative log paths
When the log file is configured as a bare file name such as
`ldk-server.log`, its parent is an empty path. Passing that to
`read_dir` fails, so rotated archives were never removed and
`log_max_files` had no effect. Treat an empty parent as the current
working directory, which is where the log file itself is opened.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 08316de commit d00a84e
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
268 | 274 | | |
269 | | - | |
| 275 | + | |
270 | 276 | | |
271 | 277 | | |
272 | 278 | | |
| |||
344 | 350 | | |
345 | 351 | | |
346 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
347 | 361 | | |
0 commit comments