mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Add AbsPathForConfigVal to consolidate datadir prefixing for path args
Most commandline/config args are interpreted as relative to datadir if not passed absolute. Consolidate the logic for this normalization.
This commit is contained in:
10
src/util.h
10
src/util.h
@@ -191,6 +191,16 @@ bool OpenDebugLog();
|
||||
void ShrinkDebugFile();
|
||||
void runCommand(const std::string& strCommand);
|
||||
|
||||
/**
|
||||
* Most paths passed as configuration arguments are treated as relative to
|
||||
* the datadir if they are not absolute.
|
||||
*
|
||||
* @param path The path to be conditionally prefixed with datadir.
|
||||
* @param net_specific Forwarded to GetDataDir().
|
||||
* @return The normalized path.
|
||||
*/
|
||||
fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific = true);
|
||||
|
||||
inline bool IsSwitchChar(char c)
|
||||
{
|
||||
#ifdef WIN32
|
||||
|
||||
Reference in New Issue
Block a user