summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-10 20:02:22 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-10 20:02:22 -0500
commit01334589f1eae801b4ed8fb72fe3816ad5b0fe78 (patch)
tree0f11bf3a75454724276105839435e52768361534 /src/or/config.c
parentdcbfe46cd63e041a5bfc4f1de008a7f9025dffce (diff)
downloadtor-01334589f1eae801b4ed8fb72fe3816ad5b0fe78.tar.gz
tor-01334589f1eae801b4ed8fb72fe3816ad5b0fe78.zip
Simplify cpd_opts usage.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c
index d9ba774e7e..c6d4de386d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1187,12 +1187,11 @@ options_act_reversible(const or_options_t *old_options, char **msg)
}
/* Ensure data directory is private; create if possible. */
- cpd_check_t cpd_group_opts = CPD_NONE;
+ cpd_check_t cpd_opts = running_tor ? CPD_CREATE : CPD_CHECK;
if (options->DataDirectoryGroupReadable)
- cpd_group_opts = CPD_GROUP_READ;
+ cpd_opts |= CPD_GROUP_READ;
if (check_private_dir(options->DataDirectory,
- running_tor ?
- CPD_CREATE|cpd_group_opts : CPD_CHECK|cpd_group_opts,
+ cpd_opts,
options->User)<0) {
tor_asprintf(msg,
"Couldn't access/create private data directory \"%s\"",