You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin#24265: Drop StripRedundantLastElementsOfPath() function
ebda2b8 util: Drop no longer needed StripRedundantLastElementsOfPath() function (Hennadii Stepanov)
ecd094e Use ArgsManager::GetPathArg() for "-walletdir" option (Hennadii Stepanov)
06fed4c Use ArgsManager::GetPathArg() for "-blocksdir" option (Hennadii Stepanov)
15b632b Use ArgsManager::GetPathArg() for "-datadir" option (Hennadii Stepanov)
540ca51 util: Add ArgsManager::GetPathArg() function (Hennadii Stepanov)
Pull request description:
[Switching](bitcoin#20744) to `std::filesystems` makes possible to leverage [`std::filesystem::path::lexically_normal`](https://en.cppreference.com/w/cpp/filesystem/path/lexically_normal) and get rid of ugly `StripRedundantLastElementsOfPath()` crutch.
To make its usage simple and error-proof, a new `ArgsManager::GetPathArg()` member function introduced which guarantees to return a normalized with no trailing slashes paths provided via `-datadir`, `-blocksdir` or `-walletdir` command-line arguments or configure options.
ACKs for top commit:
ryanofsky:
Code review ACK ebda2b8. Only change since last review is rebase which simplified the last commit
Tree-SHA512: ed86959b6038b7152b5a1d473478667b72caab1716cc9149e1a75833d50511f22157e4e5e55a9465d1fa76b90bce5e5286f4e4f0d1ae65ebd9c012fae19d835f
0 commit comments