summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_disk_monitor.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rabbit_disk_monitor.erl b/src/rabbit_disk_monitor.erl
index f3a553b4..d9e8e8e4 100644
--- a/src/rabbit_disk_monitor.erl
+++ b/src/rabbit_disk_monitor.erl
@@ -178,9 +178,8 @@ parse_free_unix(CommandResult) ->
parse_free_win32(CommandResult) ->
LastLine = lists:last(string:tokens(CommandResult, "\r\n")),
- {ok, Digits} = re:compile("([0-9]+)"),
- {match,[Free]} =
- re:run(lists:reverse(LastLine), Digits, [{capture, all_but_first, list}]),
+ {match, [Free]} = re:run(lists:reverse(LastLine), "(\\d+)",
+ [{capture, all_but_first, list}]),
list_to_integer(lists:reverse(Free)).
interpret_limit({mem_relative, R}) ->