summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-10-08 16:17:06 +0100
committerSimon MacMullen <simon@rabbitmq.com>2010-10-08 16:17:06 +0100
commitdbfdbb18346b2639e4994e90c31271020a40fc41 (patch)
treecb7bfd12488a374917f8ed6b534207b7a4d9c4a7
parent8397ca65864299a9641d88ec1b8c8c7504c0104d (diff)
downloadrabbitmq-server-dbfdbb18346b2639e4994e90c31271020a40fc41.tar.gz
Use rabbit_misc:write_term_file/2 (at a more sensible place).
-rw-r--r--src/rabbit_mnesia.erl6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index 68caafb3..babd1c58 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -93,6 +93,8 @@ status() ->
init() ->
ok = ensure_mnesia_running(),
ok = ensure_mnesia_dir(),
+ ok = rabbit_misc:write_term_file(dir() ++ "/" ++ ?SCHEMA_VERSION_FILENAME,
+ [?SCHEMA_VERSION]),
ok = init_db(read_cluster_nodes_config(), true),
ok.
@@ -245,10 +247,6 @@ ensure_mnesia_dir() ->
{error, Reason} ->
throw({error, {cannot_create_mnesia_dir, MnesiaDir, Reason}});
ok ->
- {ok, File} = file:open(MnesiaDir ++ ?SCHEMA_VERSION_FILENAME,
- write),
- io:format(File, "~p.", [?SCHEMA_VERSION]),
- ok = file:close(File),
ok
end.