Litecoin: Set path location to Litecoin directories.

This commit is contained in:
Adrian Gallagher 2015-01-19 18:25:53 +11:00 committed by Warren Togami
parent 9a98061200
commit 7383ef5364
3 changed files with 11 additions and 11 deletions

View File

@ -24,7 +24,7 @@ std::string HelpMessageCli()
string strUsage; string strUsage;
strUsage += _("Options:") + "\n"; strUsage += _("Options:") + "\n";
strUsage += " -? " + _("This help message") + "\n"; strUsage += " -? " + _("This help message") + "\n";
strUsage += " -conf=<file> " + strprintf(_("Specify configuration file (default: %s)"), "bitcoin.conf") + "\n"; strUsage += " -conf=<file> " + strprintf(_("Specify configuration file (default: %s)"), "litecoin.conf") + "\n";
strUsage += " -datadir=<dir> " + _("Specify data directory") + "\n"; strUsage += " -datadir=<dir> " + _("Specify data directory") + "\n";
strUsage += " -testnet " + _("Use the test network") + "\n"; strUsage += " -testnet " + _("Use the test network") + "\n";
strUsage += " -regtest " + _("Enter regression test mode, which uses a special chain in which blocks can be " strUsage += " -regtest " + _("Enter regression test mode, which uses a special chain in which blocks can be "

View File

@ -244,7 +244,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += " -blocknotify=<cmd> " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n"; strUsage += " -blocknotify=<cmd> " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n";
strUsage += " -checkblocks=<n> " + strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288) + "\n"; strUsage += " -checkblocks=<n> " + strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288) + "\n";
strUsage += " -checklevel=<n> " + strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), 3) + "\n"; strUsage += " -checklevel=<n> " + strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), 3) + "\n";
strUsage += " -conf=<file> " + strprintf(_("Specify configuration file (default: %s)"), "bitcoin.conf") + "\n"; strUsage += " -conf=<file> " + strprintf(_("Specify configuration file (default: %s)"), "litecoin.conf") + "\n";
if (mode == HMM_BITCOIND) if (mode == HMM_BITCOIND)
{ {
#if !defined(WIN32) #if !defined(WIN32)

View File

@ -373,13 +373,13 @@ void PrintExceptionContinue(std::exception* pex, const char* pszThread)
boost::filesystem::path GetDefaultDataDir() boost::filesystem::path GetDefaultDataDir()
{ {
namespace fs = boost::filesystem; namespace fs = boost::filesystem;
// Windows < Vista: C:\Documents and Settings\Username\Application Data\Bitcoin // Windows < Vista: C:\Documents and Settings\Username\Application Data\Litecoin
// Windows >= Vista: C:\Users\Username\AppData\Roaming\Bitcoin // Windows >= Vista: C:\Users\Username\AppData\Roaming\Litecoin
// Mac: ~/Library/Application Support/Bitcoin // Mac: ~/Library/Application Support/Litecoin
// Unix: ~/.bitcoin // Unix: ~/.litecoin
#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");
@ -391,10 +391,10 @@ boost::filesystem::path GetDefaultDataDir()
// Mac // Mac
pathRet /= "Library/Application Support"; pathRet /= "Library/Application Support";
TryCreateDirectory(pathRet); TryCreateDirectory(pathRet);
return pathRet / "Bitcoin"; return pathRet / "Litecoin";
#else #else
// Unix // Unix
return pathRet / ".bitcoin"; return pathRet / ".litecoin";
#endif #endif
#endif #endif
} }
@ -441,7 +441,7 @@ void ClearDatadirCache()
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()) if (!pathConfigFile.is_complete())
pathConfigFile = GetDataDir(false) / pathConfigFile; pathConfigFile = GetDataDir(false) / pathConfigFile;
@ -477,7 +477,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
#ifndef WIN32 #ifndef WIN32
boost::filesystem::path GetPidFile() boost::filesystem::path GetPidFile()
{ {
boost::filesystem::path pathPidFile(GetArg("-pid", "bitcoind.pid")); boost::filesystem::path pathPidFile(GetArg("-pid", "litecoin.pid"));
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile; if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
return pathPidFile; return pathPidFile;
} }