aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins/simple/SimpleDatabasePlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-07 18:54:06 +0200
committerMax Kellermann <max@duempel.org>2014-08-07 19:38:25 +0200
commitaa2e4d92e0005f4516eb591803120eff89f99109 (patch)
treebeb83ec24f0cb5b527ec60bd56c2722681f1d3f5 /src/db/plugins/simple/SimpleDatabasePlugin.cxx
parent0ea66a1275da319e2443fa1536cec7ea7fc53b53 (diff)
downloadmpd-aa2e4d92e0005f4516eb591803120eff89f99109.tar.gz
mpd-aa2e4d92e0005f4516eb591803120eff89f99109.tar.xz
mpd-aa2e4d92e0005f4516eb591803120eff89f99109.zip
fs/io/BufferedReader: new class to replace class TextFile
The new class is pluggable, to prepare for gzipped database files. For now, the TextFile class remains, and will be refactored away later.
Diffstat (limited to 'src/db/plugins/simple/SimpleDatabasePlugin.cxx')
-rw-r--r--src/db/plugins/simple/SimpleDatabasePlugin.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/db/plugins/simple/SimpleDatabasePlugin.cxx b/src/db/plugins/simple/SimpleDatabasePlugin.cxx
index ae34a523f..9e750996c 100644
--- a/src/db/plugins/simple/SimpleDatabasePlugin.cxx
+++ b/src/db/plugins/simple/SimpleDatabasePlugin.cxx
@@ -168,12 +168,9 @@ SimpleDatabase::Load(Error &error)
assert(!path.IsNull());
assert(root != nullptr);
- TextFile file(path);
- if (file.HasFailed()) {
- error.FormatErrno("Failed to open database file \"%s\"",
- path_utf8.c_str());
+ TextFile file(path, error);
+ if (file.HasFailed())
return false;
- }
if (!db_load_internal(file, *root, error))
return false;