diff options
Diffstat (limited to 'lib/file.cc')
-rw-r--r-- | lib/file.cc | 18 |
1 files changed, 12 insertions, 6 deletions
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 <config.h> #include "file.h" -#include "miav_config.h" +#include "configuration.h" + #include "info.h" #include <sys/types.h> @@ -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; } |