Don't attempt to copy non-files into dfhack-config

develop
lethosor 2015-09-03 15:02:51 -04:00
parent f1391b63e2
commit 66c7a461fd
1 changed files with 2 additions and 0 deletions

@ -1397,6 +1397,8 @@ bool Core::Init()
if (std::find(config_files.begin(), config_files.end(), filename) == config_files.end())
{
std::string src_file = std::string("dfhack-config/default/") + filename;
if (!Filesystem::isfile(src_file))
continue;
std::string dest_file = std::string("dfhack-config/") + filename;
std::ifstream src(src_file, std::ios::binary);
std::ofstream dest(dest_file, std::ios::binary);