At the moment all ".ini" files under /etc/sr.ht are loaded - even if
/etc/sr.ht/config.ini exists. To conform with the Go equivalent [1],
only config.ini will be loaded if it exists.
[1]: https://git.sr.ht/~sircmpwn/core-go/commit/3c1346e6bbc37884ca5eb390e22728e4c40e3fa5
---
srht/config.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srht/config.py b/srht/config.py
index 4504769..8ac0da3 100644
--- a/srht/config.py+++ b/srht/config.py
@@ -23,8 +23,8 @@ def load_one(path):
def load_config():
global _config
_config = ConfigParser()
- # Loads _either_ config.ini _or_ all .ini files in /etc/sr.ht- paths = ["config.ini", "/etc/sr.ht/*.ini"]+ # Only load from one of these locations+ paths = ["config.ini", "/etc/sr.ht/config.ini", "/etc/sr.ht/*.ini"] for path in paths:
loaded = any(map(lambda p: load_one(p), glob(path)))
if loaded:
base-commit: 34213d6d50ced0084a832edb461570f0e8586545
--
2.45.2