Unverified Commit 753e2b00 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

potential file metadata may only be in the first line of a file.

parent 87365659
Loading
Loading
Loading
Loading
+18 −22
Original line number Diff line number Diff line
@@ -545,9 +545,8 @@ std::string utils::get_potential_file_path(const std::string& path) {
std::string utils::get_potential_date(const std::string & path, const std::string & potential_name) {
  TextFileReader reader(path, potential_name);
  reader.ignore_comments = false;
  char * line = nullptr;

  while ((line = reader.next_line())) {
  char *line = reader.next_line();
  ValueTokenizer values(line);
  while (values.has_next()) {
    std::string word = values.next_string();
@@ -558,7 +557,6 @@ std::string utils::get_potential_date(const std::string & path, const std::strin
      }
    }
  }
  }
  return "";
}

@@ -570,9 +568,8 @@ std::string utils::get_potential_date(const std::string & path, const std::strin
std::string utils::get_potential_units(const std::string & path, const std::string & potential_name) {
  TextFileReader reader(path, potential_name);
  reader.ignore_comments = false;
  char * line = nullptr;

  while ((line = reader.next_line())) {
  char *line = reader.next_line();
  ValueTokenizer values(line);
  while (values.has_next()) {
    std::string word = values.next_string();
@@ -583,7 +580,6 @@ std::string utils::get_potential_units(const std::string & path, const std::stri
      }
    }
  }
  }
  return "";
}