From ea2feb0aa98883d0e39ff63cfd19e14882d21a0b Mon Sep 17 00:00:00 2001 From: Marek Kochanowicz Date: Mon, 28 Jul 2014 17:33:21 +0200 Subject: [PATCH] fix for bug 1672 --- apps/opencs/model/doc/document.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/opencs/model/doc/document.cpp b/apps/opencs/model/doc/document.cpp index c608757e0..348ea74c1 100644 --- a/apps/opencs/model/doc/document.cpp +++ b/apps/opencs/model/doc/document.cpp @@ -1,6 +1,7 @@ #include "document.hpp" #include +#include #include @@ -2218,16 +2219,18 @@ CSMDoc::Document::Document (const Files::ConfigurationManager& configuration, if (!boost::filesystem::exists (mProjectPath)) { - boost::filesystem::path locCustomFiltersPath (configuration.getUserDataPath()); - locCustomFiltersPath /= "defaultfilters"; + boost::filesystem::path customFiltersPath (configuration.getUserDataPath()); + customFiltersPath /= "defaultfilters"; + + std::string destinationPath = mProjectPath.string() + "/defaultfilters"; + std::ofstream dst(destinationPath.c_str(), std::ios::binary); - if (boost::filesystem::exists (locCustomFiltersPath)) + if (boost::filesystem::exists (customFiltersPath)) { - boost::filesystem::copy_file (locCustomFiltersPath, mProjectPath); - } - else + dst<