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