Allow empty lines in config ini files (#1509)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled

* Allow empty lines in config files

* Add example comment to ini example in docs/quickstart.md

---------

Co-authored-by: Max-F-Helm <m7t24zklr@relay.firefox.com>
This commit is contained in:
Max.-F. Helm 2025-08-14 03:00:05 +02:00 • committed by GitHub
parent df19f99976
commit dd1bea52cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -95,6 +95,7 @@ cache.files=off
category.create=pfrd
func.getattr=newest
dropcacheonclose=false
# comments and empty lines are supported
```
#### /etc/mergerfs/branches/media/

View file

@ -381,7 +381,7 @@ Config::from_stream(std::istream &istrm_,
while(std::getline(istrm_,line,'\n'))
{
line = str::trim(line);
if(!line.empty() && (line[0] == '#'))
if(line.empty() || (line[0] == '#'))
continue;
str::splitkv(line,'=',&key,&val);