diff options
Diffstat (limited to 'src/sdp/meta/read_config_files.d')
-rw-r--r-- | src/sdp/meta/read_config_files.d | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/sdp/meta/read_config_files.d b/src/sdp/meta/read_config_files.d index d816619..57aba7f 100644 --- a/src/sdp/meta/read_config_files.d +++ b/src/sdp/meta/read_config_files.d @@ -10,15 +10,13 @@ static template configInSite() { sdp.output.paths_source, std.file, std.path; - final string configInSite(M,E,C)(M manifest, E env, C conf_sdl) { - auto possible_config_path_locations = ConfigFilePaths!()(manifest, env).possible_config_path_locations_local_site; + final string configInSite(M,E)(M manifest, E env) { + auto conf_file_details = ConfigFilePaths!()(manifest, env); + string conf_sdl = conf_file_details.config_filename_site; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations_local_site; string config_file_str; foreach(pth; possible_config_path_locations) { - auto conf_file = format( - "%s/%s", - pth, - conf_sdl, - ); + auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { break; } @@ -45,15 +43,13 @@ static template configInDoc() { sdp.output.paths_source, std.file, std.path; - final string configInDoc(M,E,C)(M manifest, E env, C conf_sdl) { - auto possible_config_path_locations = ConfigFilePaths!()(manifest, env).possible_config_path_locations_document; + final string configInDoc(M,E)(M manifest, E env) { + auto conf_file_details = ConfigFilePaths!()(manifest, env); + string conf_sdl = conf_file_details.config_filename_document; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations_document; string config_file_str; foreach(pth; possible_config_path_locations) { - auto conf_file = format( - "%s/%s", - pth, - conf_sdl, - ); + auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { break; } @@ -105,8 +101,10 @@ static template configReadSite() { std.file, std.path; - final auto configReadSite(M,E,C)(M manifest, E env, C conf_sdl) { - auto configuration = configInSite!()(manifest, env, conf_sdl); + final auto configReadSite(M,E)(M manifest, E env) { + auto configuration = configInSite!()(manifest, env); + auto conf_file_details = ConfigFilePaths!()(manifest, env); + string conf_sdl = conf_file_details.config_filename_site; auto sdl_root = ConfigSDLang!()(configuration, conf_sdl); return sdl_root; } @@ -118,8 +116,10 @@ static template configReadDoc() { std.file, std.path; - final auto configReadDoc(M,E,C)(M manifest, E env, C conf_sdl) { - auto configuration = configInDoc!()(manifest, env, conf_sdl); + final auto configReadDoc(M,E)(M manifest, E env) { + auto configuration = configInDoc!()(manifest, env); + auto conf_file_details = ConfigFilePaths!()(manifest, env); + string conf_sdl = conf_file_details.config_filename_document; auto sdl_root = ConfigSDLang!()(configuration, conf_sdl); return sdl_root; } |