summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-10-24 18:53:57 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-10-24 18:53:57 +0000
commit944dbcd5af0f47363499c55effb85170357b77db (patch)
tree16a634d3ea704d89972530b56fa372931a14483f
parent6dab6744c77a1f044017e0b79573185264f7bb09 (diff)
use couch_util:priv_dir() b/c it works in dev mode too
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@829432 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/couchdb/couch_os_process.erl8
-rw-r--r--src/couchdb/couch_server_sup.erl2
2 files changed, 2 insertions, 8 deletions
diff --git a/src/couchdb/couch_os_process.erl b/src/couchdb/couch_os_process.erl
index 957e1a95..f42e99a8 100644
--- a/src/couchdb/couch_os_process.erl
+++ b/src/couchdb/couch_os_process.erl
@@ -103,13 +103,7 @@ readjson(OsProc) when is_record(OsProc, os_proc) ->
% gen_server API
init([Command, Options, PortOptions]) ->
- case code:priv_dir(couch) of
- {error, bad_name} ->
- % small hack, in dev mode "app" is couchdb. Fixing requires renaming
- % src/couch to src/couch. Not really worth the hassle.-Damien
- PrivDir = code:priv_dir(couchdb);
- PrivDir -> ok
- end,
+ PrivDir = couch_util:priv_dir(),
Spawnkiller = filename:join(PrivDir, "couchspawnkillable"),
BaseProc = #os_proc{
command=Command,
diff --git a/src/couchdb/couch_server_sup.erl b/src/couchdb/couch_server_sup.erl
index 989b0007..d89e987d 100644
--- a/src/couchdb/couch_server_sup.erl
+++ b/src/couchdb/couch_server_sup.erl
@@ -76,7 +76,7 @@ start_server(IniFiles) ->
LibDir =
case couch_config:get("couchdb", "util_driver_dir", null) of
null ->
- filename:join(code:priv_dir(couch), "lib");
+ filename:join(couch_util:priv_dir(), "lib");
LibDir0 -> LibDir0
end,