2 #include <msp/core/application.h>
13 if(SHGetFolderPath(0, CSIDL_PERSONAL, 0, 0, home)==S_OK)
18 Path get_user_data_dir(const string &)
20 return get_user_data_dir();
23 Path get_user_data_dir()
25 const string &appname = Application::get_name();
27 throw logic_error("no application name");
29 char datadir[MAX_PATH];
30 if(SHGetFolderPath(0, CSIDL_LOCAL_APPDATA, 0, 0, datadir)==S_OK)
31 return Path(datadir)/appname;