X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Fosx%2Fdir_location.cpp;h=89d6f576a9dc470e4c0efeabe9024c914ad2fb81;hp=7ce89f7a33de31bdf83e76d31c3da513811ca437;hb=817e584903996a041692640720a5a272d847a3c7;hpb=1a563cfd722a5571428562259790b4948980dd4f diff --git a/source/fs/osx/dir_location.cpp b/source/fs/osx/dir_location.cpp index 7ce89f7..89d6f57 100644 --- a/source/fs/osx/dir_location.cpp +++ b/source/fs/osx/dir_location.cpp @@ -1,3 +1,4 @@ +#include #include "dir.h" using namespace std; @@ -22,8 +23,12 @@ Path get_home_dir() return "."; } -Path get_user_data_dir(const string &appname) +Path get_user_data_dir() { + const string &appname = Application::get_name(); + if(appname.empty()) + throw logic_error("no application name"); + char buf[1024]; unsigned len = get_application_support_dir(buf, sizeof(buf)); if(len)