mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Fix a logic error in 4282 fixes
check_or_create_data_subdir has succeeded when it returns 0, not when it returns negative.
This commit is contained in:
parent
58721ac24c
commit
57e4324c42
@ -1146,7 +1146,7 @@ geoip_dirreq_stats_write(time_t now)
|
|||||||
str = geoip_format_dirreq_stats(now);
|
str = geoip_format_dirreq_stats(now);
|
||||||
|
|
||||||
/* Write dirreq-stats string to disk. */
|
/* Write dirreq-stats string to disk. */
|
||||||
if (check_or_create_data_subdir("stats") < 0) {
|
if (!check_or_create_data_subdir("stats")) {
|
||||||
write_to_data_subdir("stats", "dirreq-stats", str, "dirreq statistics");
|
write_to_data_subdir("stats", "dirreq-stats", str, "dirreq statistics");
|
||||||
/* Reset measurement interval start. */
|
/* Reset measurement interval start. */
|
||||||
geoip_reset_dirreq_stats(now);
|
geoip_reset_dirreq_stats(now);
|
||||||
|
Loading…
Reference in New Issue
Block a user