From 66c7a461fd5233d346ea000c2d29d4ac4c949b38 Mon Sep 17 00:00:00 2001 From: lethosor Date: Thu, 3 Sep 2015 15:02:51 -0400 Subject: [PATCH] Don't attempt to copy non-files into dfhack-config --- library/Core.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/Core.cpp b/library/Core.cpp index 9f7709c3a..854f5b0d8 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -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);