GNOME Bugzilla – Bug 743379
Add support for server-side copy
Last modified: 2015-01-25 21:35:13 UTC
Webdav supports server-side copy so we should make use of it.
Created attachment 295242 [details] [review] dav: Add support for server-side copying Use webdav's COPY method to implement support for server-side copying. This improves performance considerably, especially over slow connections.
Created attachment 295243 [details] [review] dav: Fix up error handling when moving Don't leak the source and target URI when doing a server-side move. Also, don't continue after giving an G_IO_ERROR_EXISTS.
Created attachment 295244 [details] [review] dav: Trim some duplicated text
I tested the patch against Apache, IIS and sabredav. I also attached a couple of extra patches which fix up some things I noticed.
Review of attachment 295243 [details] [review]: Looks good!
Review of attachment 295242 [details] [review]: Looks good, thanks! ::: daemon/gvfsbackenddav.c @@ +2883,3 @@ + source_uri = g_vfs_backend_dav_uri_for_path (backend, source, FALSE); + res = stat_location (backend, source_uri, &source_ft, NULL, &error); + if (!res) Maybe would be good to get target_uri before this statement and use goto error here... (just idea) @@ +2946,3 @@ + + if (SOUP_STATUS_IS_SUCCESSFUL (status)) + { The curly brackets here are redundant...
Pushed to master as be1191f1b2f3972441b2e8947d9a2ac71160a375 (with the suggested fixes). Thanks for the reviews!