mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
fix windows build, add windows GetDefaultDataDir, add files to project
This commit is contained in:
10
util.cpp
10
util.cpp
@@ -10,9 +10,15 @@
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/program_options/detail/config_file.hpp>
|
||||
#include <boost/program_options/parsers.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "util.h"
|
||||
#include "Log.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <Windows.h>
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace util
|
||||
@@ -152,7 +158,9 @@ namespace filesystem
|
||||
// Unix: ~/.i2pd
|
||||
#ifdef WIN32
|
||||
// Windows
|
||||
return GetSpecialFolderPath(CSIDL_APPDATA) / "i2pd";
|
||||
char localAppData[MAX_PATH];
|
||||
SHGetFolderPath(NULL, CSIDL_APPDATA, 0, NULL, localAppData);
|
||||
return boost::filesystem::path(std::string(localAppData) + "\\i2pd");
|
||||
#else
|
||||
boost::filesystem::path pathRet;
|
||||
char* pszHome = getenv("HOME");
|
||||
|
||||
Reference in New Issue
Block a user