Browse Source

Allow empty lines in config ini files (#1509)

* 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>
pull/1512/head
Max.-F. Helm 2 months ago
committed by GitHub
parent
commit
dd1bea52cd
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      mkdocs/docs/quickstart.md
  2. 2
      src/config.cpp

1
mkdocs/docs/quickstart.md

@ -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/

2
src/config.cpp

@ -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);

Loading…
Cancel
Save