Permalink
Browse files

fix index_dir defaults and make it available during app config

  • Loading branch information...
1 parent 458fe73 commit bab06b286c0de9b412632b0b2a7c16e0c60e67c8 @benoitc benoitc committed Dec 8, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 apps/couch_index/src/couch_index_util.erl
@@ -19,12 +19,13 @@
root_dir() ->
+ Default = couch:get_app_env(index_dir, couch_server:database_dir()),
case couch_config:get("couchdb", "index_dir") of
- undefined -> couch_config:get("couchdb", "view_index_dir");
+ undefined -> couch_config:get("couchdb", "view_index_dir",
+ Default);
Value -> Value
end.
-
index_dir(Module, DbName) when is_binary(DbName) ->
DbDir = "." ++ binary_to_list(DbName) ++ "_design",
filename:join([root_dir(), DbDir, Module]);

0 comments on commit bab06b2

Please sign in to comment.