diff options
author | Max Kellermann <max@duempel.org> | 2012-10-04 09:34:48 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-10-04 10:31:53 +0200 |
commit | efbf184fe80c61f7666ded3342fcb97c1b770758 (patch) | |
tree | 82a7e8abd83e7edd68a1983ca16daae6753d625e /src/CommandError.cxx | |
parent | dd577fb857141bc0d8bfa094a4697163b17deaad (diff) | |
download | mpd-efbf184fe80c61f7666ded3342fcb97c1b770758.tar.gz mpd-efbf184fe80c61f7666ded3342fcb97c1b770758.tar.xz mpd-efbf184fe80c61f7666ded3342fcb97c1b770758.zip |
PlaylistFile, client_file, tag_id3: don't use g_file_error_quark()
g_file_error_quark() is meant to be used with the GFileError enum
which does not correspond with errno, but must be converted with
g_file_error_from_errno().
At the same time, this removes g_strerror() use for
g_file_error_quark().
Diffstat (limited to 'src/CommandError.cxx')
-rw-r--r-- | src/CommandError.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/CommandError.cxx b/src/CommandError.cxx index 428a615e5..32d3cb5ec 100644 --- a/src/CommandError.cxx +++ b/src/CommandError.cxx @@ -20,6 +20,7 @@ #include "config.h" #include "CommandError.hxx" #include "db_error.h" +#include "io_error.h" extern "C" { #include "protocol/result.h" @@ -119,11 +120,15 @@ print_error(struct client *client, GError *error) command_error(client, ACK_ERROR_NO_EXIST, "Not found"); return COMMAND_RETURN_ERROR; } - } else if (error->domain == g_file_error_quark()) { + } else if (error->domain == errno_quark()) { command_error(client, ACK_ERROR_SYSTEM, "%s", g_strerror(error->code)); g_error_free(error); return COMMAND_RETURN_ERROR; + } else if (error->domain == g_file_error_quark()) { + command_error(client, ACK_ERROR_SYSTEM, "%s", error->message); + g_error_free(error); + return COMMAND_RETURN_ERROR; } g_error_free(error); |