From bdcb9189e4cf221bec1efaf2e6e612b127e51f25 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 6 Jan 2018 20:34:42 -0500 Subject: 0.23.3 work on source & target file paths/locations --- src/sdp/meta/read_config_files.d | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/sdp/meta/read_config_files.d') diff --git a/src/sdp/meta/read_config_files.d b/src/sdp/meta/read_config_files.d index 57aba7f..52446e8 100644 --- a/src/sdp/meta/read_config_files.d +++ b/src/sdp/meta/read_config_files.d @@ -12,9 +12,13 @@ static template configInSite() { std.path; 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 conf_sdl = conf_file_details.possible_config_path_locations.config_filename_site; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations.local_site; string config_file_str; + debug(io) { + writeln("in config filename: ", conf_sdl); + writeln("in config possible path locations: ", possible_config_path_locations); + } foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { @@ -22,8 +26,8 @@ static template configInSite() { } try { if (exists(conf_file)) { - debug(configfile) { - writeln(conf_file); + debug(io) { + writeln("in config file found: ", conf_file); } config_file_str = conf_file.readText; break; @@ -46,8 +50,12 @@ static template configInDoc() { 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; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations.document; string config_file_str; + debug(io) { + writeln("in config filename: ", conf_sdl); + writeln("in config possible path locations: ", possible_config_path_locations); + } foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { @@ -55,8 +63,8 @@ static template configInDoc() { } try { if (exists(conf_file)) { - debug(configfile) { - writeln(conf_file); + debug(io) { + writeln("in config file found: ", conf_file); } config_file_str = conf_file.readText; break; @@ -104,7 +112,7 @@ static template configReadSite() { 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; + string conf_sdl = conf_file_details.possible_config_path_locations.config_filename_site; auto sdl_root = ConfigSDLang!()(configuration, conf_sdl); return sdl_root; } -- cgit v1.2.3