summaryrefslogtreecommitdiff
path: root/client/gdaemonfile.c
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2014-10-23 16:16:51 +0200
committerDebarshi Ray <debarshir@gnome.org>2014-10-29 13:45:26 +0100
commit2a0dc68c7eeb9a945860b68a295d5c1d9101bd0f (patch)
treecb6722ca12b82e4efe29d31f0b8408ca0e2f6fd4 /client/gdaemonfile.c
parent3150f9d3090c5253fd8761644a8c99dfd1ebb947 (diff)
downloadgvfs-2a0dc68c7eeb9a945860b68a295d5c1d9101bd0f.tar.gz
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
Diffstat (limited to 'client/gdaemonfile.c')
-rw-r--r--client/gdaemonfile.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index d16ac09b..69104c5e 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 */