Skip to content

Commit f6da25c

Browse files
author
Alexey Lebedeff
committed
Add back mnesia dir reset/restore
Use a more descriptive variable name, which explains why this can't be actually squashed into a single call to rabbit_mnesia:dir/0.
1 parent ce49870 commit f6da25c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rabbit_mnesia.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,11 +840,12 @@ with_running_or_clean_mnesia(Fun) ->
840840
case IsMnesiaRunning of
841841
true -> Fun();
842842
false ->
843+
SavedMnesiaDir = dir(),
843844
application:unset_env(mnesia, dir),
844845
mnesia:start(),
845846
Result = Fun(),
846847
application:stop(mnesia),
847-
application:set_env(mnesia, dir, dir()),
848+
application:set_env(mnesia, dir, SavedMnesiaDir),
848849
Result
849850
end.
850851

0 commit comments

Comments
 (0)