diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-08-17 21:18:17 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-08-17 21:33:59 (GMT) |
commit | 6856199274e9c5e581220fccf520b8f011519d17 (patch) | |
tree | 1929a1ea8f1d3b877fc8c928e9c3d23d9716ad82 /Swiftob/LuaCommands.cpp | |
parent | 4397df6b409ca84f63838fa635fc2abe8af80b71 (diff) | |
download | swift-contrib-6856199274e9c5e581220fccf520b8f011519d17.zip swift-contrib-6856199274e9c5e581220fccf520b8f011519d17.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); |