log = widen(paths.get(L"log-path", initialPath + L"\\log\\"));\r
ftemplate = complete(wpath(widen(paths.get(L"template-path", initialPath + L"\\template\\")))).string(); \r
data = widen(paths.get(L"data-path", initialPath + L"\\data\\"));\r
+\r
+ try\r
+ {\r
+ for(auto it = boost::filesystem2::wdirectory_iterator(initialPath); it != boost::filesystem2::wdirectory_iterator(); ++it)\r
+ {\r
+ if(it->filename().find(L".fth") != std::wstring::npos) \r
+ {\r
+ auto from_path = *it;\r
+ auto to_path = boost::filesystem2::wpath(ftemplate + L"/" + it->filename());\r
+ \r
+ if(boost::filesystem2::exists(to_path))\r
+ boost::filesystem2::remove(to_path);\r
+\r
+ boost::filesystem2::copy_file(from_path, to_path);\r
+ } \r
+ }\r
+ }\r
+ catch(...)\r
+ {\r
+ CASPAR_LOG_CURRENT_EXCEPTION();\r
+ CASPAR_LOG(error) << L"Failed to copy template-hosts from initial-path to template-path.";\r
+ }\r
}\r
catch(...)\r
{\r