Resolve intermittent test failure

the previous regex filter still allowed files with cdb in the body of the name (which can be true as filenames are guid based)
This commit is contained in:
Martin Sumner 2020-03-17 17:29:59 +00:00
parent 5b4edfebb6
commit 50cb98ecdd

View file

@ -881,16 +881,9 @@ restore_topending(RootPath, FileName) ->
find_journals(RootPath) ->
{ok, FNsA_J} = file:list_dir(RootPath ++ "/journal/journal_files"),
{ok, Regex} = re:compile(".*\.cdb"),
CDBFiles = lists:foldl(fun(FN, Acc) -> case re:run(FN, Regex) of
nomatch ->
Acc;
_ ->
[FN|Acc]
end
end,
[],
FNsA_J),
% Must not return a file with the .pnd extension
CDBFiles =
lists:filter(fun(FN) -> filename:extension(FN) == ".cdb" end, FNsA_J),
CDBFiles.
convert_to_seconds({MegaSec, Seconds, _MicroSec}) ->