spdlog_setup
spdlog_setup copied to clipboard
Fix TOCTOU in create_dirs_impl
Replace the check whether a directory exists before trying to create it with handling for already-exists cases. This addresses a race where the directory is created by another process, leading to a failure.
This happened when multiple processes were started up simultaneously with configurations that lead to the creation of the same parent directory.
Codecov Report
Merging #73 (0162cc0) into master (a991861) will decrease coverage by
0.35%
. The diff coverage is62.50%
.
@@ Coverage Diff @@
## master #73 +/- ##
==========================================
- Coverage 88.16% 87.80% -0.36%
==========================================
Files 4 4
Lines 566 566
==========================================
- Hits 499 497 -2
- Misses 67 69 +2
Impacted Files | Coverage Δ | |
---|---|---|
include/spdlog_setup/details/conf_impl.h | 89.63% <62.50%> (-0.52%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a991861...0162cc0. Read the comment docs.