Fix header usage functionality

This commit is contained in:
ado 2024-02-25 03:54:33 +01:00
parent 05f87bc78b
commit 110ee840cc
2 changed files with 7 additions and 3 deletions

View File

@ -214,7 +214,7 @@ public:
reader_.next_line_converter_.set_column_mapping(column_mappings, reader_.next_line_converter_.set_column_mapping(column_mappings,
header_.size()); header_.size());
if (line() == 1) { if (line() == 0) {
ignore_next(); ignore_next();
} }
} }

View File

@ -78,13 +78,17 @@ struct unique_file_name {
unique_file_name(const std::string& test) { unique_file_name(const std::string& test) {
do { do {
name = "random_file_test_" + test + "_" + std::to_string(i++) + name = "ssp_test_" + test + "_" + std::to_string(i++) +
"_" + time_now_rand() + "_file.csv"; "_" + time_now_rand() + "_file.csv";
} while (std::filesystem::exists(name)); } while (std::filesystem::exists(name));
} }
~unique_file_name() { ~unique_file_name() {
try {
std::filesystem::remove(name); std::filesystem::remove(name);
} catch (const std::filesystem::filesystem_error& e) {
std::cerr << e.what() << std::endl;
}
} }
}; };