[gvfs/wip/goa: 6/8] client: Remove inconsistencies between async and sync variants
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/goa: 6/8] client: Remove inconsistencies between async and sync variants
- Date: Thu, 23 Oct 2014 17:22:26 +0000 (UTC)
commit e392822ad5ae1993537f28524d14a22ab5697a11
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Oct 23 16:16:51 2014 +0200
client: Remove inconsistencies between async and sync variants
The async implementation of find_enclosing_mount does not assume that
there is a GMountInfo when no error has occurred.
https://bugzilla.gnome.org/show_bug.cgi?id=739075
client/gdaemonfile.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index d16ac09..69104c5 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -2278,9 +2278,19 @@ g_daemon_file_find_enclosing_mount (GFile *file,
daemon_file->path,
cancellable,
error);
- if (mount_info == NULL)
+
+ if (error)
goto out;
+ if (mount_info == NULL)
+ {
+ g_set_error (error, G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ "Internal error: \"%s\"",
+ "No error but no mount info from g_daemon_vfs_get_mount_info_sync");
+ goto out;
+ }
+
if (mount_info->user_visible)
{
/* if we have a daemon volume monitor then return one of it's mounts */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]