summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/index.erl b/src/index.erl
index 9d0df96..a6849d6 100644
--- a/src/index.erl
+++ b/src/index.erl
@@ -98,6 +98,7 @@ indexsize(Basepath) ->
case file:open(Basepath, [read, binary]) of
{ok, File} ->
{ok, Filesize} = file:position(File, eof),
+ file:close(File),
lager:debug("file ~p size ~p", [Basepath, Filesize]),
Filesize div ?ENTRYSIZEINFILE;
{error, Error} ->
@@ -131,6 +132,7 @@ getrange(Basepath, Start, End) when Start =< End ->
file:close(File),
Entry;
true ->
+ file:close(File),
noentry
end;
{error, Error} ->