GNOME Bugzilla – Bug 710321
g_file_move returns incorrect error
Last modified: 2013-11-01 12:19:41 UTC
When the source file is on an ftp backend, g_file_move() gives the wrong error code if the source file does not exist. It returns "Operation failed" instead of "file not found".
Created attachment 257446 [details] [review] ftp: Return the correct error code for a failed move operation When the source file does not exist for a move operation, return G_IO_ERROR_NOT_FOUND (as specified by the docs) instead of G_IO_ERROR_FAILED.
Review of attachment 257446 [details] [review]: It looks good, just note... ::: daemon/gvfsbackendftp.c @@ +1325,3 @@ GVfsFtpFile *srcfile, *destfile; + static const GVfsFtpErrorFunc rnfr_handlers[] = { error_550_permission_or_not_found, + NULL }; Wouldn't be better to name it move_handlers?
Well it's specifically a handler for the RNFR command and not the RNTO command which is also part of the overall do_move(). But I guess either way would be OK.
Pushed to master as 7fae708. Thanks!