X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Fwindows%2Fdir.cpp;h=3d2bf6e65a8f5fd461a48d51d595265c1bad2fec;hp=151cc1b0944c4b455655c1f426da09c0ee81f89f;hb=e2b5cb6cd61bf8c6f56f624cc835233df92288da;hpb=edf916d784e503505ddac2acef6f3e9a72abb0d6 diff --git a/source/fs/windows/dir.cpp b/source/fs/windows/dir.cpp index 151cc1b..3d2bf6e 100644 --- a/source/fs/windows/dir.cpp +++ b/source/fs/windows/dir.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include "dir.h" @@ -57,23 +57,5 @@ void chdir(const Path &path) throw system_error("SetCurrentDirectory"); } -Path get_home_dir() -{ - char home[MAX_PATH]; - if(SHGetFolderPath(0, CSIDL_PERSONAL, 0, 0, home)==S_OK) - return home; - return "."; -} - -Path get_user_data_dir(const string &appname) -{ - if(appname.empty()) - throw invalid_argument("get_user_data_dir"); - char datadir[MAX_PATH]; - if(SHGetFolderPath(0, CSIDL_LOCAL_APPDATA, 0, 0, datadir)==S_OK) - return Path(datadir)/appname; - return "."; -} - } // namespace FS } // namespace Msp