aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/StandardDirectory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/StandardDirectory.cxx')
-rw-r--r--src/fs/StandardDirectory.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fs/StandardDirectory.cxx b/src/fs/StandardDirectory.cxx
index 20d66bb10..6456c0254 100644
--- a/src/fs/StandardDirectory.cxx
+++ b/src/fs/StandardDirectory.cxx
@@ -50,6 +50,8 @@
#ifdef ANDROID
#include "java/Global.hxx"
#include "android/Environment.hxx"
+#include "android/Context.hxx"
+#include "Main.hxx"
#endif
#ifndef WIN32
@@ -252,6 +254,18 @@ AllocatedPath GetUserMusicDir()
#endif
}
+AllocatedPath
+GetUserCacheDir()
+{
+#ifdef USE_XDG
+ return GetUserDir("XDG_CACHE_DIR");
+#elif defined(ANDROID)
+ return context->GetCacheDir(Java::GetEnv());
+#else
+ return AllocatedPath::Null();
+#endif
+}
+
#ifdef WIN32
AllocatedPath GetSystemConfigDir()