summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/modules/StorageBackendFile/StorageBackendFile.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/StorageBackendFile/StorageBackendFile.cpp b/src/modules/StorageBackendFile/StorageBackendFile.cpp
index 6a9242d..33c6b0f 100644
--- a/src/modules/StorageBackendFile/StorageBackendFile.cpp
+++ b/src/modules/StorageBackendFile/StorageBackendFile.cpp
@@ -147,6 +147,9 @@ boost::shared_ptr<Common::XmlData> StorageBackendFile::load(const std::string &t
throw Core::Exception(Core::Exception::NOT_AVAILABLE);
boost::filesystem::path path = getFileName(type, name);
+ if(!boost::filesystem::is_regular_file(path))
+ throw Core::Exception(Core::Exception::NOT_FOUND);
+
return boost::shared_ptr<Common::XmlData>(new Common::XmlData(path.file_string()));
}