fs/io/TextFile: split into class FileLineReader and AutoGunzipFileLineReader

Detangle dependencies.
This commit is contained in:
Max Kellermann
2023-11-25 22:39:48 +01:00
parent d888bb1902
commit 08a5768764
14 changed files with 57 additions and 43 deletions

View File

@@ -4,9 +4,9 @@
#include "config.h"
#include "db/plugins/simple/DatabaseSave.hxx"
#include "db/plugins/simple/Directory.hxx"
#include "lib/zlib/AutoGunzipFileLineReader.hxx"
#include "fs/Path.hxx"
#include "fs/NarrowPath.hxx"
#include "fs/io/TextFile.hxx"
#include "util/PrintException.hxx"
int
@@ -20,7 +20,7 @@ try {
const FromNarrowPath db_path = argv[1];
Directory root{{}, nullptr};
TextFile line_reader{db_path};
AutoGunzipFileLineReader line_reader{db_path};
db_load_internal(line_reader, root, true);
return EXIT_SUCCESS;