diff options
Diffstat (limited to 'Swiften/Application/Application.cpp')
-rw-r--r-- | Swiften/Application/Application.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Application/Application.cpp b/Swiften/Application/Application.cpp index 6ffb46f..e5c925a 100644 --- a/Swiften/Application/Application.cpp +++ b/Swiften/Application/Application.cpp @@ -23,7 +23,14 @@ boost::filesystem::path Application::getAvatarDir() const { boost::filesystem::path Application::getHomeDir() const { // FIXME: Does this work on windows? + // No it doesn't, putting alternative paths in for the moment. char* homeDirRaw = getenv("HOME"); + if (!homeDirRaw) { + homeDirRaw = getenv("APPDATA"); + } + if (!homeDirRaw) { + homeDirRaw = getenv("USERPROFILE"); + } boost::filesystem::path homeDir(homeDirRaw); return homeDir; } |