Ensure manifest dir when starting Penciller

Otherwise may fail based on test ordering
This commit is contained in:
martinsumner 2016-11-03 20:09:38 +00:00
parent d5ac4d412d
commit c3a6489b93

View file

@ -596,13 +596,9 @@ start_from_file(PCLopts) ->
levelzero_maxcachesize=MaxTableSize}, levelzero_maxcachesize=MaxTableSize},
%% Open manifest %% Open manifest
ManifestPath = InitState#state.root_path ++ "/" ++ ?MANIFEST_FP ++ "/", ManifestPath = filename:join(InitState#state.root_path, ?MANIFEST_FP),
{ok, Filenames} = case filelib:is_dir(ManifestPath) of filelib:ensure_dir(ManifestPath),
true -> {ok, Filenames} = file:list_dir(ManifestPath),
file:list_dir(ManifestPath);
false ->
{ok, []}
end,
CurrRegex = "nonzero_(?<MSN>[0-9]+)\\." ++ ?CURRENT_FILEX, CurrRegex = "nonzero_(?<MSN>[0-9]+)\\." ++ ?CURRENT_FILEX,
ValidManSQNs = lists:foldl(fun(FN, Acc) -> ValidManSQNs = lists:foldl(fun(FN, Acc) ->
case re:run(FN, case re:run(FN,