aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Krjuchkov <denis@crazydev.net>2013-02-02 20:23:27 +0600
committerDenis Krjuchkov <denis@crazydev.net>2013-02-02 20:23:27 +0600
commitc64700e7ae8f52bbf2c0e8a3673f587155719a07 (patch)
treefa3808f19e453ae5e347e376cd0434ed3e40da44
parent5bd1917705d15d23f0eb4625bcc1433ce9049a4b (diff)
downloadmpd-c64700e7ae8f52bbf2c0e8a3673f587155719a07.tar.gz
mpd-c64700e7ae8f52bbf2c0e8a3673f587155719a07.tar.xz
mpd-c64700e7ae8f52bbf2c0e8a3673f587155719a07.zip
TextFile.hxx: use file system API
-rw-r--r--src/TextFile.hxx5
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;