Changeset 19134


Ignore:
Timestamp:
08/03/18 16:13:43 (6 years ago)
Author:
tbretz
Message:
Skip empty lines reading an environment file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/rootifysql.cc

    r19126 r19134  
    9595        "$TEST or ${TEST} by '1, 2, 3'. This is useful for the SQL `IN` keyword. "
    9696        "You can also read the values for an enviroment substitution from a file "
    97         "(one element per line), e.g. --env.TEST=file.txt. Lines starting with a # "
    98         "are skipped.\n"
     97        "(one element per line), e.g. --env.TEST=file.txt. Empty lines and lines "
     98        "starting with a # are skipped.\n"
    9999        "\n"
    100100        "Comments in the query-file can be placed according to the SQL standard inline "
     
    442442
    443443        for (string line; getline(fin, line); )
    444             if (Tools::Trim(line)[0]!='#')
     444        {
     445            const auto &l = Tools::Trim(line);
     446            if (!l.empty() && l[0]!='#')
    445447                envs[ident].push_back(line);
    446448
Note: See TracChangeset for help on using the changeset viewer.