Skip to content

Commit 09e38b6

Browse files
committed
ignore empty lines in the FileFetcher input list
1 parent a0c7d5a commit 09e38b6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Common/Utils/src/FileFetcher.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,12 @@ void FileFetcher::processInput(const std::vector<std::string>& input)
8484
{
8585
for (auto inp : input) {
8686
o2::utils::Str::trim(inp);
87-
8887
if (fs::is_directory(inp)) {
8988
processDirectory(inp);
9089
} else if (mSelRegex && !std::regex_match(inp, *mSelRegex.get())) { // provided selector does not match, treat as a txt file with list
9190
// Avoid reading a multigiB data file as a list of inputs
9291
// bringing down the system.
9392
std::filesystem::path p(inp);
94-
9593
if (std::filesystem::file_size(p) > 10000000) {
9694
LOGP(error, "file list {} larger than 10MB. Is this a data file?", inp);
9795
continue;
@@ -106,7 +104,7 @@ void FileFetcher::processInput(const std::vector<std::string>& input)
106104
std::vector<std::string> newInput;
107105
while (getline(listFile, line)) {
108106
o2::utils::Str::trim(line);
109-
if (line[0] == '#') { // ignore commented file
107+
if (line[0] == '#' || line.empty()) { // ignore commented file or empty line
110108
continue;
111109
}
112110
newInput.push_back(line);

0 commit comments

Comments
 (0)