summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 36dc9dfeda..5781682c12 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -4753,7 +4753,10 @@ or_state_load(void)
log_warn(LD_BUG, "Unable to parse state in \"%s\". Moving it aside "
"to \"%s\". This could be a bug in Tor; please tell "
"the developers.", fname, fname2);
- (int)rename(fname, fname2);
+ if (rename(fname, fname2) < 0) {
+ log_warn(LD_BUG, "Weirdly, I couldn't even mode the state aside. The "
+ "OS gave an error of %s", strerror(errno));
+ }
}
tor_free(fname2);
tor_free(contents);