diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-08-17 21:18:17 (GMT) |
---|---|---|
committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-19 20:17:52 (GMT) |
commit | e5548caf08dbb4fe4208a23ece9e8e9e0667a8dd (patch) | |
tree | 152859d7c7120df7cda802869ba01192052e6001 /Swiftob/LuaCommands.cpp | |
parent | a216cabfbd9ee0244e70d1eb6093986e430c9ef1 (diff) | |
download | swift-contrib-e5548caf08dbb4fe4208a23ece9e8e9e0667a8dd.zip swift-contrib-e5548caf08dbb4fe4208a23ece9e8e9e0667a8dd.tar.bz2 |
Update to boost.filesystem v3.
Source should still compile against v2.
Diffstat (limited to 'Swiftob/LuaCommands.cpp')
-rw-r--r-- | Swiftob/LuaCommands.cpp | 7 |
1 files changed, 6 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); |