summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-08-17 21:18:17 (GMT)
committerCătălin Badea <catalin.badea392@gmail.com>2012-08-19 20:17:52 (GMT)
commite5548caf08dbb4fe4208a23ece9e8e9e0667a8dd (patch)
tree152859d7c7120df7cda802869ba01192052e6001 /Swiftob
parenta216cabfbd9ee0244e70d1eb6093986e430c9ef1 (diff)
downloadswift-contrib-e5548caf08dbb4fe4208a23ece9e8e9e0667a8dd.zip
swift-contrib-e5548caf08dbb4fe4208a23ece9e8e9e0667a8dd.tar.bz2
Update to boost.filesystem v3.
Source should still compile against v2.
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>