summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2010-05-26 15:24:15 +0100
committerBastien Nocera <hadess@hadess.net>2010-05-26 15:24:37 +0100
commit49c9ab7ddd8c20ad1722d20185a0fc3e71ce2d20 (patch)
tree5b0c9f8f1a6b27b3906476c5f5bc134449d9ecd4
parentfff176c2b14516bc572576199490a0f526999b24 (diff)
downloadgnome-bluetooth-49c9ab7ddd8c20ad1722d20185a0fc3e71ce2d20.tar.gz
Don't fail to browse the device if already mounted
We don't need to have an error if the device is already mounted, just show it already!
-rw-r--r--applet/main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/applet/main.c b/applet/main.c
index 5655a750..dd517c82 100644
--- a/applet/main.c
+++ b/applet/main.c
@@ -114,9 +114,16 @@ mount_finish_cb (GObject *source_object,
if (g_file_mount_enclosing_volume_finish (G_FILE (source_object),
res, &error) == FALSE) {
- g_printerr ("Failed to mount OBEX volume: %s", error->message);
- g_error_free (error);
- return;
+ /* Ignore "already mounted" error */
+ if (error->domain == G_IO_ERROR &&
+ error->code == G_IO_ERROR_ALREADY_MOUNTED) {
+ g_error_free (error);
+ error = NULL;
+ } else {
+ g_printerr ("Failed to mount OBEX volume: %s", error->message);
+ g_error_free (error);
+ return;
+ }
}
uri = g_file_get_uri (G_FILE (source_object));