From 2453e643b71e0e28383af1459ca5f4c64751a884 Mon Sep 17 00:00:00 2001 From: Martin Wehner Date: Fri, 2 Jan 2004 07:45:53 +0000 Subject: [PATCH] Ensure the source isn't deleted as partial copy in a duplicate operation. 2004-01-02 Martin Wehner * libnautilus-private/nautilus-file-operations.c: Ensure the source isn't deleted as partial copy in a duplicate operation. Fixes bug #128095. --- ChangeLog | 6 ++++++ libnautilus-private/nautilus-file-operations.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e0bb8cb24..754d4f843 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-01-02 Martin Wehner + + * libnautilus-private/nautilus-file-operations.c: + Ensure the source isn't deleted as partial copy + in a duplicate operation. Fixes bug #128095. + === nautilus 2.5.4 === 2003-12-29 Alexander Larsson diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c index 395ae9a76..c89860087 100644 --- a/libnautilus-private/nautilus-file-operations.c +++ b/libnautilus-private/nautilus-file-operations.c @@ -386,9 +386,11 @@ handle_transfer_ok (const GnomeVFSXferProgressInfo *progress_info, if (transfer_info->cancelled && progress_info->phase != GNOME_VFS_XFER_PHASE_COMPLETED) { /* If cancelled, delete any partially copied files that are laying - * around and return. + * around and return. Don't delete the source though.. */ if (progress_info->target_name != NULL + && progress_info->source_name != NULL + && strcmp (progress_info->source_name, progress_info->target_name) != 0 && progress_info->bytes_total != progress_info->bytes_copied) { GList *delete_me;