From 75841f8237ad2a7d1e1535fddc8fc338611b02c4 Mon Sep 17 00:00:00 2001 From: Kevin Lynx Date: Tue, 16 Jul 2013 22:48:11 +0800 Subject: [PATCH] fix cache_indexer state not saved correctly --- src/cache_indexer/index_file.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cache_indexer/index_file.erl b/src/cache_indexer/index_file.erl index 1503124..23d08c3 100644 --- a/src/cache_indexer/index_file.erl +++ b/src/cache_indexer/index_file.erl @@ -42,7 +42,9 @@ worker_run(Parent, Conn, FileName) -> process_hash(Conn, FileName, FP, PrintPos, MaxPos, CheckStep) -> case io:get_line(FP, "") of - eof -> 0; + eof -> + check_progress(FileName, MaxPos, 0, MaxPos, CheckStep), + 0; Line -> save_hash(Conn, strip_lf(Line)), {ok, Pos} = file:position(FP, cur),