aboutsummaryrefslogtreecommitdiff
path: root/src/or/statefile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/statefile.c')
-rw-r--r--src/or/statefile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/statefile.c b/src/or/statefile.c
index 7b9998fc1a..dd1894beb7 100644
--- a/src/or/statefile.c
+++ b/src/or/statefile.c
@@ -1,7 +1,7 @@
/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2013, The Tor Project, Inc. */
+ * Copyright (c) 2007-2015, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define STATEFILE_PRIVATE
@@ -323,7 +323,10 @@ or_state_load(void)
goto done;
}
break;
+ /* treat empty state files as if the file doesn't exist, and generate
+ * a new state file, overwriting the empty file in or_state_save() */
case FN_NOENT:
+ case FN_EMPTY:
break;
case FN_ERROR:
case FN_DIR: