summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2007-09-25 10:14:00 +0000
committerAlexander Larsson <alexl@src.gnome.org>2007-09-25 10:14:00 +0000
commit3d7fcf248db3b5314d61950510d85b1b0e37af14 (patch)
tree8d9d05608b6d0eaf13b0504cefd5133aa8562a4b
parent87f3eb26b453914f25a7b0471ca54e314cd131b7 (diff)
downloadgvfs-3d7fcf248db3b5314d61950510d85b1b0e37af14.tar.gz
Return NOT_SUPPORTED error for unsupported uri types
2007-09-25 Alexander Larsson <alexl@redhat.com> * daemon/mount.c: Return NOT_SUPPORTED error for unsupported uri types svn path=/trunk/; revision=961
-rw-r--r--ChangeLog5
-rw-r--r--daemon/mount.c16
2 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 90ceaf1d..661f509f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2007-09-25 Alexander Larsson <alexl@redhat.com>
+ * daemon/mount.c:
+ Return NOT_SUPPORTED error for unsupported uri types
+
+2007-09-25 Alexander Larsson <alexl@redhat.com>
+
* client/gvfsfusedaemon.c:
* daemon/gvfsbackendsmbbrowse.c:
Update for G_IO_ERROR_NOT_MOUNTABLE_FILE name change
diff --git a/daemon/mount.c b/daemon/mount.c
index 363aca32..4e698ec0 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -618,14 +618,16 @@ maybe_automount (GMountSpec *spec,
mountable_mount (mountable, spec, mount_source, TRUE, automount_done, data);
g_object_unref (mount_source);
}
+ else if (mountable != NULL)
+ reply = _dbus_message_new_gerror (message,
+ G_IO_ERROR,
+ G_IO_ERROR_NOT_MOUNTED,
+ _("The specified location is not mounted"));
else
- {
- reply = _dbus_message_new_gerror (message,
- G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED,
- (mountable == NULL) ?
- _("Location is not mountable") :
- _("Location is not mounted"));
- }
+ reply = _dbus_message_new_gerror (message,
+ G_IO_ERROR,
+ G_IO_ERROR_NOT_SUPPORTED,
+ _("The specified location is not supported"));
return reply;
}