diff options
author | Christian Kellner <christian@kellner.me> | 2016-08-28 23:49:06 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2016-08-29 17:26:56 +0200 |
commit | 5a560b96d1e72efe104c3145893f0207436e3156 (patch) | |
tree | 542ca2a6d8cb430a8b582c5c7e0ee17d3182d24e /daemon | |
parent | 3c147616d5fbdf2aa22ef21aae9d38cf55675c6c (diff) | |
download | gvfs-5a560b96d1e72efe104c3145893f0207436e3156.tar.gz |
dav: properly handle cancellation during mounting
If the user cancels the authentication dialog during the mount
operation, we should catch that case and instead of returing
G_IO_ERROR_FAILED we should G_IO_ERROR_FAILED_HANDLED. This will
prevent an (expected) error being back to the user. This is in
line with what other backends do in the same situation.
https://bugzilla.gnome.org/show_bug.cgi?id=770549
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gvfsbackenddav.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c index 1da12bff..465632e5 100644 --- a/daemon/gvfsbackenddav.c +++ b/daemon/gvfsbackenddav.c @@ -1995,7 +1995,8 @@ do_mount (GVfsBackend *backend, SoupMessage *target = !is_success ? msg_opts : msg_stat; int error_code = http_error_code_from_status (target->status_code); - /* TODO: set correct error in case of cancellation */ + if (error_code == G_IO_ERROR_CANCELLED) + error_code = G_IO_ERROR_FAILED_HANDLED; g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR, error_code, |