From f1216d8b51a78ebf8c7ba7a1ff05423baa940772 Mon Sep 17 00:00:00 2001 From: YoungHui Park Date: Tue, 10 Nov 2020 17:32:26 -0600 Subject: [PATCH] Fix old surface source reading on settings --- src/settings.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/settings.cpp b/src/settings.cpp index 18cf61f498..d9c2857f8b 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -652,17 +652,12 @@ void read_settings_xml() // Get surface source read node xml_node node_ssr = root.child("surf_src_read"); - settings::path_source = "surface_source.h5"; + std::string path = "surface_source.h5"; // Check if the user has specified different file for surface source reading if (check_for_node(node_ssr, "path")) { - settings::path_source = get_node_value(node_ssr, "path", false, true); + path = get_node_value(node_ssr, "path", false, true); } - - // Check if surface source file exists - if (!file_exists(settings::path_source)) { - fatal_error(fmt::format("Source file '{}' does not exist.", - settings::path_source)); - } + model::external_sources.push_back(std::make_unique(path)); } // If source is not seperate and is to be written out in the statepoint file,