From efbf184fe80c61f7666ded3342fcb97c1b770758 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 4 Oct 2012 09:34:48 +0200 Subject: 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(). --- src/CommandError.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/CommandError.cxx') 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); -- cgit v1.2.3