From 84ff11d0ab13e08cd03aaf9fd8405ff8026f5fc6 Mon Sep 17 00:00:00 2001 From: Digmaster Date: Mon, 26 Jan 2015 12:50:44 -0600 Subject: [PATCH] check if v2 exists before attemping to copy it --- apps/openmw/engine.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 2821824932..d7230a3940 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -375,8 +375,11 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings) bool keybinderUserExists = boost::filesystem::exists(keybinderUser); if(!keybinderUserExists) { - boost::filesystem::copy_file(mCfgMgr.getUserConfigPath() / "input_v2.xml", mCfgMgr.getUserConfigPath() / "input_v3.xml"); - keybinderUserExists = boost::filesystem::exists(keybinderUser); + std::string input2 = (mCfgMgr.getUserConfigPath() / "input_v2.xml").string(); + if(boost::filesystem::exists(input2)) { + boost::filesystem::copy_file(input2, keybinderUser); + keybinderUserExists = boost::filesystem::exists(keybinderUser); + } } // find correct path to the game controller bindings