From 81a5b370a221ba1c5b37983786b490b9ceceea85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Mon, 14 Feb 2011 23:03:50 +0100
Subject: Fixed UnixApplicationPathProvider.


diff --git a/SwifTools/Application/UnixApplicationPathProvider.cpp b/SwifTools/Application/UnixApplicationPathProvider.cpp
index 2ac39ab..c0d24ab 100644
--- a/SwifTools/Application/UnixApplicationPathProvider.cpp
+++ b/SwifTools/Application/UnixApplicationPathProvider.cpp
@@ -6,13 +6,17 @@
 
 #include "SwifTools/Application/UnixApplicationPathProvider.h"
 
+#include <boost/algorithm/string.hpp>
+
+#include <Swiften/Base/String.h>
+
 namespace Swift {
 
 UnixApplicationPathProvider::UnixApplicationPathProvider(const std::string& name) : ApplicationPathProvider(name) {
 	resourceDirs.push_back(getExecutableDir() / "../resources"); // Development
 	char* xdgDataDirs = getenv("XDG_DATA_DIRS");
 	if (xdgDataDirs) {
-		std::vector<std::string> dataDirs = std::string(xdgDataDirs).split(':');
+		std::vector<std::string> dataDirs = String::split(xdgDataDirs, ':');
 		if (!dataDirs.empty()) {
 			foreach(const std::string& dir, dataDirs) {
 				resourceDirs.push_back(boost::filesystem::path(dir) / "swift");
@@ -38,7 +42,7 @@ boost::filesystem::path UnixApplicationPathProvider::getDataDir() const {
 
 	boost::filesystem::path dataPath = (dataDir.empty() ? 
 			getHomeDir() / ".local" / "share" 
-			: boost::filesystem::path(dataDir)) / getApplicationName().getLowerCase();
+			: boost::filesystem::path(dataDir)) / boost::to_lower_copy(getApplicationName());
 
 	try {
 		boost::filesystem::create_directories(dataPath);
-- 
cgit v0.10.2-6-g49f6