summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiftob')
-rw-r--r--Swiftob/LuaCommands.cpp7
-rw-r--r--Swiftob/Storage.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/Swiftob/LuaCommands.cpp b/Swiftob/LuaCommands.cpp
index 27c44eb..89f5159 100644
--- a/Swiftob/LuaCommands.cpp
+++ b/Swiftob/LuaCommands.cpp
@@ -14,6 +14,7 @@
#include <Swiften/Base/foreach.h>
#include <Swiften/Client/Client.h>
#include <Swiften/Network/TimerFactory.h>
+#include <boost/filesystem/operations.hpp>
#include <Swiftob/Commands.h>
@@ -405,7 +406,11 @@ void LuaCommands::loadScript(boost::filesystem::path filePath) {
luaL_openlibs(lua);
lua_pushlightuserdata(lua, this);
lua_setfield(lua, LUA_REGISTRYINDEX, LUA_COMMANDS);
- std::string filename(filePath.filename());
+#if BOOST_FILESYSTEM_VERSION == 2 // TODO: Delete this when boost 1.44 becomes a minimum requirement, and we no longer need v2
+ std::string filename = filePath.filename();
+#else
+ std::string filename = filePath.filename().string();
+#endif
filename += ".storage";
boost::filesystem::path storagePath(boost::filesystem::path(path_) / filename);
Storage* storage = new Storage(storagePath);
diff --git a/Swiftob/Storage.cpp b/Swiftob/Storage.cpp
index 47d0619..141be9f 100644
--- a/Swiftob/Storage.cpp
+++ b/Swiftob/Storage.cpp
@@ -6,6 +6,8 @@
#include <Swiftob/Storage.h>
+#include <boost/filesystem/operations.hpp>
+
#include <Swiften/Base/String.h>
#include <Swiften/Base/ByteArray.h>
#include <Swiften/Base/foreach.h>