[gvfs/gnome-2-28] Bug 598660 - Must honor the remove_source switch
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs/gnome-2-28] Bug 598660 - Must honor the remove_source switch
- Date: Fri, 27 Nov 2009 14:15:59 +0000 (UTC)
commit 70299f7d5ddfe416248e8899fe4db4127af88b07
Author: Christian Kellner <gicmo gnome org>
Date: Fri Oct 16 13:03:23 2009 +0200
Bug 598660 - Must honor the remove_source switch
(cherry picked from commit 854db908aaad2690d56ae2dfd061207c5a6215ee)
daemon/gvfsbackendobexftp.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendobexftp.c b/daemon/gvfsbackendobexftp.c
index 84969db..eb1b43b 100644
--- a/daemon/gvfsbackendobexftp.c
+++ b/daemon/gvfsbackendobexftp.c
@@ -1826,7 +1826,18 @@ do_push (GVfsBackend *backend,
*/
_invalidate_cache_helper (op_backend);
- g_vfs_job_succeeded (G_VFS_JOB (job));
+ if (remove_source && g_unlink (local_path) == -1)
+ {
+ int errsv = errno;
+
+ g_vfs_job_failed (G_VFS_JOB (job),
+ G_IO_ERROR,
+ g_io_error_from_errno (errsv),
+ _("Error deleting file: %s"),
+ g_strerror (errsv));
+ }
+ else
+ g_vfs_job_succeeded (G_VFS_JOB (job));
op_backend->doing_io = FALSE;
g_mutex_unlock (op_backend->mutex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]