summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Application')
-rw-r--r--Swiften/Application/Application.cpp6
-rw-r--r--Swiften/Application/Application.h1
-rw-r--r--Swiften/Application/Windows/WindowsApplication.h3
3 files changed, 7 insertions, 3 deletions
diff --git a/Swiften/Application/Application.cpp b/Swiften/Application/Application.cpp
index 52fd14c..e21d9e7 100644
--- a/Swiften/Application/Application.cpp
+++ b/Swiften/Application/Application.cpp
@@ -24,4 +24,10 @@ boost::filesystem::path Application::getHomeDir() const {
return homeDir;
}
+boost::filesystem::path Application::getProfileDir(const String& profile) const {
+ boost::filesystem::path result(getHomeDir() / profile.getUTF8String());
+ boost::filesystem::create_directory(result);
+ return result;
+}
+
}
diff --git a/Swiften/Application/Application.h b/Swiften/Application/Application.h
index 4900107..4fda7af 100644
--- a/Swiften/Application/Application.h
+++ b/Swiften/Application/Application.h
@@ -16,6 +16,7 @@ namespace Swift {
boost::filesystem::path getSettingsFileName() const;
boost::filesystem::path getHomeDir() const;
virtual boost::filesystem::path getSettingsDir() const = 0;
+ boost::filesystem::path getProfileDir(const String& profile) const;
const String& getName() const {
return name_;
diff --git a/Swiften/Application/Windows/WindowsApplication.h b/Swiften/Application/Windows/WindowsApplication.h
index 0fc4b12..9f1abb4 100644
--- a/Swiften/Application/Windows/WindowsApplication.h
+++ b/Swiften/Application/Windows/WindowsApplication.h
@@ -1,8 +1,6 @@
#ifndef SWIFTEN_WindowsApplication_H
#define SWIFTEN_WindowsApplication_H
-#include <cassert>
-
#include "Swiften/Application/Application.h"
#include "Swiften/Application/NullApplicationMessageDisplay.h"
@@ -18,7 +16,6 @@ namespace Swift {
}
boost::filesystem::path getSettingsDir() const {
- assert(false);
// FIXME: This is wrong
boost::filesystem::path result(getHomeDir() / ("." + getName().getUTF8String()));
boost::filesystem::create_directory(result);