diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2010-10-08 16:17:06 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2010-10-08 16:17:06 +0100 |
commit | dbfdbb18346b2639e4994e90c31271020a40fc41 (patch) | |
tree | cb7bfd12488a374917f8ed6b534207b7a4d9c4a7 | |
parent | 8397ca65864299a9641d88ec1b8c8c7504c0104d (diff) | |
download | rabbitmq-server-dbfdbb18346b2639e4994e90c31271020a40fc41.tar.gz |
Use rabbit_misc:write_term_file/2 (at a more sensible place).
-rw-r--r-- | src/rabbit_mnesia.erl | 6 |
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. |