summaryrefslogtreecommitdiffstats
path: root/src/modules/StorageBackendFile
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/StorageBackendFile')
-rw-r--r--src/modules/StorageBackendFile/StorageBackendFile.cpp21
-rw-r--r--src/modules/StorageBackendFile/StorageBackendFile.h3
2 files changed, 3 insertions, 21 deletions
diff --git a/src/modules/StorageBackendFile/StorageBackendFile.cpp b/src/modules/StorageBackendFile/StorageBackendFile.cpp
index e5da4e0..e801a64 100644
--- a/src/modules/StorageBackendFile/StorageBackendFile.cpp
+++ b/src/modules/StorageBackendFile/StorageBackendFile.cpp
@@ -28,27 +28,10 @@ namespace Mad {
namespace Modules {
namespace StorageBackendFile {
-bool StorageBackendFile::handleConfigEntry(const Core::ConfigEntry &entry, bool /*handled*/) {
- if(!entry[0].getKey().matches("Storage"))
- return false;
-
+void StorageBackendFile::configure() {
boost::lock_guard<boost::shared_mutex> lock(mutex);
- if(entry[1].getKey().matches("Root")) {
- if(!entry[2].isEmpty())
- return false;
-
- storageRoot = entry[1][0].toLocale();
- }
- else if(!entry[1].isEmpty()) {
- return false;
- }
-
- return true;
-}
-
-void StorageBackendFile::configFinished() {
- boost::lock_guard<boost::shared_mutex> lock(mutex);
+ storageRoot = application->getConfigManager()->get("Storage.Root").toLocale();
if(!boost::filesystem::exists(storageRoot)) {
boost::filesystem::create_directories(storageRoot);
diff --git a/src/modules/StorageBackendFile/StorageBackendFile.h b/src/modules/StorageBackendFile/StorageBackendFile.h
index f38e674..b1c685d 100644
--- a/src/modules/StorageBackendFile/StorageBackendFile.h
+++ b/src/modules/StorageBackendFile/StorageBackendFile.h
@@ -45,8 +45,7 @@ class StorageBackendFile : public Common::StorageBackend, private Core::Configur
boost::filesystem::path getFileName(const Core::String &type, const Core::String &name);
protected:
- virtual bool handleConfigEntry(const Core::ConfigEntry &entry, bool handled);
- virtual void configFinished();
+ virtual void configure();
virtual std::set<Core::String> listTypes() throw (Core::Exception);
virtual std::set<Core::String> list(const Core::String &type) throw (Core::Exception);