Fix incorrect VC default HTTP token path when the --datadir flag is present (#6748)

* Fix incorrect default http token path when datadir flag is present.
This commit is contained in:
Jimmy Chen
2025-01-08 14:12:39 +11:00
committed by GitHub
parent 80cfbea7fe
commit 87b72dec21
3 changed files with 20 additions and 5 deletions

View File

@@ -106,6 +106,7 @@ pub struct Config {
impl Default for Config {
fn default() -> Self {
// This value is always overridden when building config from CLI.
let http_token_path = dirs::home_dir()
.unwrap_or_else(|| PathBuf::from("."))
.join(DEFAULT_ROOT_DIR)