[glib: 5/6] glocalfile: Fix error code when trash not found
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 5/6] glocalfile: Fix error code when trash not found
- Date: Sat, 9 Jun 2018 00:29:23 +0000 (UTC)
commit 1cbb5dd95fd188bb9c7a213b144e058163a10a7a
Author: Ondrej Holy <oholy redhat com>
Date: Fri Jun 8 13:40:04 2018 +0200
glocalfile: Fix error code when trash not found
G_IO_ERROR_NOT_SUPPORTED is used as parameter for g_set_io_error(),
however, errno is expected instead and thus error code is set to 0,
which is wrong. Let's use ENOTSUP instead.
gio/glocalfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index 793118023..1c8fa42e8 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -1967,7 +1967,7 @@ g_local_file_trash (GFile *file,
{
g_set_io_error (error,
_("Unable to find toplevel directory to trash %s"),
- file, G_IO_ERROR_NOT_SUPPORTED);
+ file, ENOTSUP);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]