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:
parent
5b4edfebb6
commit
50cb98ecdd
1 changed files with 3 additions and 10 deletions
|
@ -881,16 +881,9 @@ restore_topending(RootPath, FileName) ->
|
||||||
|
|
||||||
find_journals(RootPath) ->
|
find_journals(RootPath) ->
|
||||||
{ok, FNsA_J} = file:list_dir(RootPath ++ "/journal/journal_files"),
|
{ok, FNsA_J} = file:list_dir(RootPath ++ "/journal/journal_files"),
|
||||||
{ok, Regex} = re:compile(".*\.cdb"),
|
% Must not return a file with the .pnd extension
|
||||||
CDBFiles = lists:foldl(fun(FN, Acc) -> case re:run(FN, Regex) of
|
CDBFiles =
|
||||||
nomatch ->
|
lists:filter(fun(FN) -> filename:extension(FN) == ".cdb" end, FNsA_J),
|
||||||
Acc;
|
|
||||||
_ ->
|
|
||||||
[FN|Acc]
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
[],
|
|
||||||
FNsA_J),
|
|
||||||
CDBFiles.
|
CDBFiles.
|
||||||
|
|
||||||
convert_to_seconds({MegaSec, Seconds, _MicroSec}) ->
|
convert_to_seconds({MegaSec, Seconds, _MicroSec}) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue