diff options
Diffstat (limited to '')
-rw-r--r-- | src/TextFile.hxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/TextFile.hxx b/src/TextFile.hxx index c4822aaf8..d593e0961 100644 --- a/src/TextFile.hxx +++ b/src/TextFile.hxx @@ -22,11 +22,10 @@ #include "gcc.h" #include "fs/Path.hxx" +#include "fs/FileSystem.hxx" #include <glib.h> -#include <stdio.h> - class TextFile { static constexpr size_t max_length = 512 * 1024; static constexpr size_t step = 1024; @@ -37,7 +36,7 @@ class TextFile { public: TextFile(const Path &path_fs) - :file(fopen(path_fs.c_str(), "r")), + :file(FOpen(path_fs, FOpenMode::ReadText)), buffer(g_string_sized_new(step)) {} TextFile(const TextFile &other) = delete; |