summaryrefslogtreecommitdiff
path: root/lib/file.cc
diff options
context:
space:
mode:
authordeva <deva>2006-08-16 23:48:22 +0000
committerdeva <deva>2006-08-16 23:48:22 +0000
commit6c07f9219bed6ccddc9b65ad40414cf0a9f7d633 (patch)
tree95f5fe5db16808d7b13511a6344bc269692e6e17 /lib/file.cc
parentcca64725502c1035ca50675dda6c42dad18f0cbf (diff)
Finished the Configuration class (Still missing vector<string> though!)
Replaced the old MiavConfig class with the new Configuration class in all the the appropriate places.
Diffstat (limited to 'lib/file.cc')
-rw-r--r--lib/file.cc18
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;
}