aboutsummaryrefslogtreecommitdiffstats
path: root/src/CommandError.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/CommandError.cxx7
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);