Merge pull request #414 from davidsklar/next
Use ./.ledgerrc if ~/.ledgerrc doesn't exist
This commit is contained in:
commit
61156c8618
1 changed files with 7 additions and 4 deletions
|
|
@ -144,6 +144,9 @@ void global_scope_t::read_init()
|
||||||
} else {
|
} else {
|
||||||
if (const char * home_var = std::getenv("HOME")) {
|
if (const char * home_var = std::getenv("HOME")) {
|
||||||
init_file = (path(home_var) / ".ledgerrc");
|
init_file = (path(home_var) / ".ledgerrc");
|
||||||
|
if (! exists(init_file)) {
|
||||||
|
init_file = ("./.ledgerrc");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
init_file = ("./.ledgerrc");
|
init_file = ("./.ledgerrc");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue