summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2015-08-29 21:57:56 +0100
committerRoss Lagerwall <rosslagerwall@gmail.com>2015-08-30 19:19:17 +0100
commitfdba53046de6f90daf5fd2394b052dbc75cf6662 (patch)
treeef0460c90f4d70b19f4216714c6ff6f3390203e5
parent45d047068d18cd01a517450476aa1f8fa0371b7c (diff)
downloadgvfs-fdba53046de6f90daf5fd2394b052dbc75cf6662.tar.gz
mtp: Fix error handling from a807f12d5663
After commit a807f12d5663 ("MTP: return ENOTEMPTY if trying to delete a non-empty directory"), G_IO_ERROR_NOT_EMPTY is returned if a generic error occurs when deleting. Fix it by calling fail_job() as the rest of the code does. https://bugzilla.gnome.org/show_bug.cgi?id=753590
-rw-r--r--daemon/gvfsbackendmtp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index be63218f..5bc1e641 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -2080,9 +2080,7 @@ do_delete (GVfsBackend *backend,
LIBMTP_Clear_Errorstack (device);
files = LIBMTP_Get_Files_And_Folders (device, entry->storage, entry->id);
if (LIBMTP_Get_Errorstack (device) != NULL) {
- g_vfs_job_failed_literal (G_VFS_JOB (job),
- G_IO_ERROR, G_IO_ERROR_NOT_EMPTY,
- _("Error checking for directory emptiness"));
+ fail_job (G_VFS_JOB (job), device);
goto exit;
}