From 8d1d3ef74a3aaeb48e3a5e12c5c4b2f2752e74f9 Mon Sep 17 00:00:00 2001 From: Valient Gough Date: Mon, 5 May 2008 03:40:42 +0000 Subject: [PATCH] ensure boost::filesystem::path is created with native option git-svn-id: http://encfs.googlecode.com/svn/trunk@21 db9cf616-1c43-0410-9cb8-a902689de0d6 --- encfs/FileUtils.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/encfs/FileUtils.cpp b/encfs/FileUtils.cpp index e6afac1..5cdfd0e 100644 --- a/encfs/FileUtils.cpp +++ b/encfs/FileUtils.cpp @@ -318,7 +318,9 @@ bool readV6Config( const char *configFile, EncFSConfig *config, { (void)info; - fs::ifstream st(configFile); + fs::path fsPath( configFile, fs::native ); + fs::ifstream st( fsPath ); + if(st.is_open()) { try @@ -468,7 +470,9 @@ bool saveConfig( ConfigType type, const string &rootDir, bool writeV6Config( const char *configFile, EncFSConfig *config ) { - fs::ofstream st( configFile ); + fs::path fsPath( configFile, fs::native ); + fs::ofstream st( fsPath ); + if(!st.is_open()) return false;