Skip to content

Commit

Permalink
ensure that every key has a matching value
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaboud committed Apr 20, 2021
1 parent bdcbd31 commit e02d5e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/impl/autotierfs/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,12 @@ Config::Config(const fs::path &config_path, std::list<Tier> &tiers, const Config
strip_whitespace(key);
strip_whitespace(value);

if(key.empty() || value.empty())
if(key.empty())
continue; // ignore unassigned fields
else if(value.empty()){
Logging::log.error("Config parameter does not a have value: " + key);
errors = true;
}

if(key == "Path"){
tptr->path(value);
Expand Down

0 comments on commit e02d5e9

Please sign in to comment.