]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/unix/dir.cpp
Have get_user_data_dir return a proper location on Android
[libs/core.git] / source / fs / unix / dir.cpp
index 8169a63fffbe9809af24012ed4ae28101ac881e3..0dc950bf00da0b8ff82b5e26e25346be3170be41 100644 (file)
@@ -1,4 +1,3 @@
-#include <cstdlib>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <msp/core/systemerror.h>
@@ -33,20 +32,5 @@ void chdir(const Path &path)
                throw system_error("chdir");
 }
 
-Path get_home_dir()
-{
-       const char *home = getenv("HOME");
-       if(home)
-               return home;
-       return ".";
-}
-
-Path get_user_data_dir(const string &appname)
-{
-       if(appname.empty())
-               throw invalid_argument("get_user_data_dir");
-       return get_home_dir()/("."+appname);
-}
-
 } // namespace FS
 } // namespace Msp