@@ -45,7 +45,7 @@ init_schemas(App, Config) ->
45
45
]).
46
46
47
47
find_app_schema (App , DepsDir ) ->
48
- Schema = filename : join ([DepsDir , App , " priv" , get_schema_for ( App )] ),
48
+ Schema = get_schema_for ([DepsDir , App , " priv" ], App ),
49
49
does_schema_exist (filelib :is_regular (Schema ), App , DepsDir , Schema , cont ).
50
50
51
51
does_schema_exist (true , _App , _DepsDir , Schema , _ ) ->
@@ -54,12 +54,11 @@ does_schema_exist(false, App, _DepsDir, _Schema, stop) ->
54
54
ct :fail (" Could not find schema for app: ~p~n " , [App ]);
55
55
does_schema_exist (false , App , DepsDir , _Schema , cont ) ->
56
56
% If not in umbrella, priv will be at ../priv
57
- PrivDir = filename :join ([DepsDir , " .." , " priv" ]),
58
- Schema = filename :join ([PrivDir , get_schema_for (App )]),
57
+ Schema = get_schema_for ([DepsDir , " .." , " priv" ], App ),
59
58
does_schema_exist (filelib :is_regular (Schema ), App , DepsDir , Schema , stop ).
60
59
61
- get_schema_for (App ) ->
62
- filename :join ([" schema" , atom_to_list (App ) ++ " .schema" ]).
60
+ get_schema_for (Prefix , App ) ->
61
+ filename :join (Prefix ++ [" schema" , atom_to_list (App ) ++ " .schema" ]).
63
62
64
63
copy_to (File , Dir ) ->
65
64
BaseName = filename :basename (File ),
0 commit comments