[gvfs] mtp: Fix error handling from a807f12d5663
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] mtp: Fix error handling from a807f12d5663
- Date: Sun, 30 Aug 2015 18:20:52 +0000 (UTC)
commit fdba53046de6f90daf5fd2394b052dbc75cf6662
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Sat Aug 29 21:57:56 2015 +0100
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
daemon/gvfsbackendmtp.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index be63218..5bc1e64 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]