From 6c07f9219bed6ccddc9b65ad40414cf0a9f7d633 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 16 Aug 2006 23:48:22 +0000 Subject: Finished the Configuration class (Still missing vector though!) Replaced the old MiavConfig class with the new Configuration class in all the the appropriate places. --- lib/file.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'lib/file.cc') diff --git a/lib/file.cc b/lib/file.cc index 88e8df1..bba2f5b 100644 --- a/lib/file.cc +++ b/lib/file.cc @@ -24,10 +24,10 @@ * along with MIaV; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include #include "file.h" -#include "miav_config.h" +#include "configuration.h" + #include "info.h" #include @@ -80,8 +80,14 @@ File::~File() MIaV::info->info("[%s]", filelist[cnt].c_str()); } - std::string *trash = MIaV::config->readString("server_trash"); - std::string *later = MIaV::config->readString("server_later"); + // std::string *trash = MIaV::config->readString("server_trash"); + // std::string *later = MIaV::config->readString("server_later"); + std::string trash; + if(MIaV::config->get("server_trash", &trash)) + MIaV::info->error("Could not read [server_trash] symbol from config file."); + std::string later; + if(MIaV::config->get("server_later", &later)) + MIaV::info->error("Could not read [server_later] symbol from config file."); switch(savestate) { case NO_CHANGE: @@ -94,12 +100,12 @@ File::~File() case DELETE: MIaV::info->info("Files in this session is to be deleted (moved to trash)."); - Move((char*)trash->c_str()); + Move((char*)trash.c_str()); break; case LATER: MIaV::info->info("Files in this session is stored for later decisson."); - Move((char*)later->c_str()); + Move((char*)later.c_str()); break; } -- cgit v1.2.3