aboutsummaryrefslogtreecommitdiffstats
path: root/src/OtherCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-10 18:02:44 +0200
committerMax Kellermann <max@duempel.org>2013-09-04 18:14:22 +0200
commit29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch)
tree79766830b55ebca38ddbce84d8d548227eedb69e /src/OtherCommands.cxx
parentc9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff)
downloadmpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.gz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.xz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.zip
util/Error: new error passing library
Replaces GLib's GError.
Diffstat (limited to 'src/OtherCommands.cxx')
-rw-r--r--src/OtherCommands.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/OtherCommands.cxx b/src/OtherCommands.cxx
index 547946e3e..04ccf6d54 100644
--- a/src/OtherCommands.cxx
+++ b/src/OtherCommands.cxx
@@ -34,6 +34,7 @@
#include "ls.hxx"
#include "Volume.hxx"
#include "util/UriUtil.hxx"
+#include "util/Error.hxx"
#include "fs/Path.hxx"
extern "C" {
@@ -126,8 +127,8 @@ handle_lsinfo(Client *client, int argc, char *argv[])
return COMMAND_RETURN_ERROR;
}
- GError *error = NULL;
- if (!client_allow_file(client, path_fs, &error))
+ Error error;
+ if (!client_allow_file(client, path_fs, error))
return print_error(client, error);
Song *song = Song::LoadFile(path_utf8, nullptr);
@@ -147,7 +148,8 @@ handle_lsinfo(Client *client, int argc, char *argv[])
return result;
if (isRootDirectory(uri)) {
- const auto &list = ListPlaylistFiles(NULL);
+ Error error;
+ const auto &list = ListPlaylistFiles(error);
print_spl_list(client, list);
}