Browse Source

Litecoin: Runtime paths s/bitcoin/litecoin/

0.8
Warren Togami 12 years ago
parent
commit
4f21807de8
  1. 12
      src/util.cpp

12
src/util.cpp

@ -981,7 +981,7 @@ static std::string FormatException(std::exception* pex, const char* pszThread)
char pszModule[MAX_PATH] = ""; char pszModule[MAX_PATH] = "";
GetModuleFileNameA(NULL, pszModule, sizeof(pszModule)); GetModuleFileNameA(NULL, pszModule, sizeof(pszModule));
#else #else
const char* pszModule = "bitcoin"; const char* pszModule = "litecoin";
#endif #endif
if (pex) if (pex)
return strprintf( return strprintf(
@ -1023,7 +1023,7 @@ boost::filesystem::path GetDefaultDataDir()
// Unix: ~/.bitcoin // Unix: ~/.bitcoin
#ifdef WIN32 #ifdef WIN32
// Windows // Windows
return GetSpecialFolderPath(CSIDL_APPDATA) / "Bitcoin"; return GetSpecialFolderPath(CSIDL_APPDATA) / "Litecoin";
#else #else
fs::path pathRet; fs::path pathRet;
char* pszHome = getenv("HOME"); char* pszHome = getenv("HOME");
@ -1035,10 +1035,10 @@ boost::filesystem::path GetDefaultDataDir()
// Mac // Mac
pathRet /= "Library/Application Support"; pathRet /= "Library/Application Support";
fs::create_directory(pathRet); fs::create_directory(pathRet);
return pathRet / "Bitcoin"; return pathRet / "Litecoin";
#else #else
// Unix // Unix
return pathRet / ".bitcoin"; return pathRet / ".litecoin";
#endif #endif
#endif #endif
} }
@ -1079,7 +1079,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
boost::filesystem::path GetConfigFile() boost::filesystem::path GetConfigFile()
{ {
boost::filesystem::path pathConfigFile(GetArg("-conf", "bitcoin.conf")); boost::filesystem::path pathConfigFile(GetArg("-conf", "litecoin.conf"));
if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile; if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile;
return pathConfigFile; return pathConfigFile;
} }
@ -1113,7 +1113,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
boost::filesystem::path GetPidFile() boost::filesystem::path GetPidFile()
{ {
boost::filesystem::path pathPidFile(GetArg("-pid", "bitcoind.pid")); boost::filesystem::path pathPidFile(GetArg("-pid", "litecoind.pid"));
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile; if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
return pathPidFile; return pathPidFile;
} }

Loading…
Cancel
Save