mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 08:58:54 +02:00
even more cases of not returning in error path
2008-02-20 Benjamin Otte <otte@gnome.org> * gfile.c: (g_file_mount_mountable), (g_file_unmount_mountable), (g_file_eject_mountable): even more cases of not returning in error path svn path=/trunk/; revision=6545
This commit is contained in:
committed by
Benjamin Otte
parent
ea6cf346d6
commit
03c51e95a7
@@ -1,3 +1,9 @@
|
|||||||
|
2008-02-20 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
|
* gfile.c: (g_file_mount_mountable), (g_file_unmount_mountable),
|
||||||
|
(g_file_eject_mountable):
|
||||||
|
even more cases of not returning in error path
|
||||||
|
|
||||||
2008-02-20 Benjamin Otte <otte@gnome.org>
|
2008-02-20 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
* gfile.c: (g_file_mount_mountable):
|
* gfile.c: (g_file_mount_mountable):
|
||||||
|
51
gio/gfile.c
51
gio/gfile.c
@@ -3308,15 +3308,16 @@ g_file_mount_mountable (GFile *file,
|
|||||||
|
|
||||||
iface = G_FILE_GET_IFACE (file);
|
iface = G_FILE_GET_IFACE (file);
|
||||||
|
|
||||||
if (iface->mount_mountable == NULL) {
|
if (iface->mount_mountable == NULL)
|
||||||
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
{
|
||||||
callback,
|
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
||||||
user_data,
|
callback,
|
||||||
G_IO_ERROR,
|
user_data,
|
||||||
G_IO_ERROR_NOT_SUPPORTED,
|
G_IO_ERROR,
|
||||||
_("Operation not supported"));
|
G_IO_ERROR_NOT_SUPPORTED,
|
||||||
return;
|
_("Operation not supported"));
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
(* iface->mount_mountable) (file,
|
(* iface->mount_mountable) (file,
|
||||||
flags,
|
flags,
|
||||||
@@ -3391,12 +3392,15 @@ g_file_unmount_mountable (GFile *file,
|
|||||||
iface = G_FILE_GET_IFACE (file);
|
iface = G_FILE_GET_IFACE (file);
|
||||||
|
|
||||||
if (iface->unmount_mountable == NULL)
|
if (iface->unmount_mountable == NULL)
|
||||||
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
{
|
||||||
callback,
|
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
||||||
user_data,
|
callback,
|
||||||
G_IO_ERROR,
|
user_data,
|
||||||
G_IO_ERROR_NOT_SUPPORTED,
|
G_IO_ERROR,
|
||||||
_("Operation not supported"));
|
G_IO_ERROR_NOT_SUPPORTED,
|
||||||
|
_("Operation not supported"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
(* iface->unmount_mountable) (file,
|
(* iface->unmount_mountable) (file,
|
||||||
flags,
|
flags,
|
||||||
@@ -3470,13 +3474,16 @@ g_file_eject_mountable (GFile *file,
|
|||||||
|
|
||||||
iface = G_FILE_GET_IFACE (file);
|
iface = G_FILE_GET_IFACE (file);
|
||||||
|
|
||||||
if (iface->eject_mountable == NULL)
|
if (iface->eject_mountable == NULL)
|
||||||
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
{
|
||||||
callback,
|
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
||||||
user_data,
|
callback,
|
||||||
G_IO_ERROR,
|
user_data,
|
||||||
G_IO_ERROR_NOT_SUPPORTED,
|
G_IO_ERROR,
|
||||||
_("Operation not supported"));
|
G_IO_ERROR_NOT_SUPPORTED,
|
||||||
|
_("Operation not supported"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
(* iface->eject_mountable) (file,
|
(* iface->eject_mountable) (file,
|
||||||
flags,
|
flags,
|
||||||
|
Reference in New Issue
Block a user