2 #include <msp/core/application.h>
3 #include <msp/core/except.h>
14 if(SHGetFolderPath(nullptr, CSIDL_PERSONAL, nullptr, 0, home)==S_OK)
19 Path get_user_data_dir()
21 const string &appname = Application::get_name();
23 throw invalid_state("no application name");
25 char datadir[MAX_PATH];
26 if(SHGetFolderPath(nullptr, CSIDL_LOCAL_APPDATA, nullptr, 0, datadir)==S_OK)
27 return Path(datadir)/appname;