diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-04-16 18:46:21 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-04-18 19:11:46 (GMT) |
commit | 676f09bd4af048f71916039f1c4fd59e9305cccd (patch) | |
tree | 486e7894385673d662d34f6498a2916d2a909274 | |
parent | 7a3925cb996b7d8b0b683557255880747851e9ae (diff) | |
download | swift-676f09bd4af048f71916039f1c4fd59e9305cccd.zip swift-676f09bd4af048f71916039f1c4fd59e9305cccd.tar.bz2 |
Fixed linking problems for swiften-config.
-rw-r--r-- | Swiften/Base/Paths.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Base/Paths.cpp b/Swiften/Base/Paths.cpp index 43eee57..d901ff9 100644 --- a/Swiften/Base/Paths.cpp +++ b/Swiften/Base/Paths.cpp @@ -25,7 +25,7 @@ boost::filesystem::path Paths::getExecutablePath() { uint32_t size = 4096; path.resize(size); if (_NSGetExecutablePath(reinterpret_cast<char*>(path.getData()), &size) == 0) { - return boost::filesystem::path(path.toString().c_str()).parent_path(); + return boost::filesystem::path(std::string(reinterpret_cast<const char*>(path.getData()), path.getSize()).c_str()).parent_path(); } #elif defined(SWIFTEN_PLATFORM_LINUX) ByteArray path; @@ -33,13 +33,13 @@ boost::filesystem::path Paths::getExecutablePath() { size_t size = readlink("/proc/self/exe", reinterpret_cast<char*>(path.getData()), path.getSize()); if (size > 0) { path.resize(size); - return boost::filesystem::path(path.toString().c_str()).parent_path(); + return boost::filesystem::path(std::string(reinterpret_cast<const char*>(path.getData()), path.getSize()).c_str()).parent_path(); } #elif defined(SWIFTEN_PLATFORM_WINDOWS) ByteArray data; data.resize(2048); GetModuleFileName(NULL, reinterpret_cast<char*>(data.getData()), data.getSize()); - return boost::filesystem::path(data.toString().c_str()).parent_path(); + return boost::filesystem::path(std::string(reinterpret_cast<const char*>(data.getData()), data.getSize()).c_str()).parent_path(); #endif return boost::filesystem::path(); } |