]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/osx/dir_location.cpp
Fix references to deprecated functions
[libs/core.git] / source / fs / osx / dir_location.cpp
index 7ce89f7a33de31bdf83e76d31c3da513811ca437..7e9985b008228d25bce53ae5331839d4e933c428 100644 (file)
@@ -1,3 +1,4 @@
+#include <msp/core/application.h>
 #include "dir.h"
 
 using namespace std;
@@ -22,8 +23,17 @@ Path get_home_dir()
        return ".";
 }
 
-Path get_user_data_dir(const string &appname)
+Path get_user_data_dir(const string &)
 {
+       return get_user_data_dir();
+}
+
+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)