diff options
author | Alexander Larsson <alexl@redhat.com> | 2007-11-20 15:57:05 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2007-11-20 15:57:05 +0000 |
commit | ae5eb8d2310e05f9d76eefccadb506ec012c7274 (patch) | |
tree | 93259b7912bfab68f13a283f6489a213c6b5c3d4 | |
parent | bf060bc33734eb894c3a3698e6f7a7f17e90065c (diff) | |
download | nautilus-ae5eb8d2310e05f9d76eefccadb506ec012c7274.tar.gz |
Pass in same_fs instead of dest_fs_id so we can reuse copy_file
2007-11-20 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
Pass in same_fs instead of dest_fs_id so we can
reuse copy_file recursively and only check once.
svn path=/branches/gio-branch/; revision=13429
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | libnautilus-private/nautilus-file-operations.c | 26 |
2 files changed, 19 insertions, 13 deletions
@@ -1,6 +1,12 @@ 2007-11-20 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: + Pass in same_fs instead of dest_fs_id so we can + reuse copy_file recursively and only check once. + +2007-11-20 Alexander Larsson <alexl@redhat.com> + + * libnautilus-private/nautilus-file-operations.c: More work on file copies 2007-11-20 Alexander Larsson <alexl@redhat.com> diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c index 9dd41995b..9a13000c2 100644 --- a/libnautilus-private/nautilus-file-operations.c +++ b/libnautilus-private/nautilus-file-operations.c @@ -4635,11 +4635,10 @@ static void copy_file (CommonJob *job, GFile *src, GFile *dest_dir, - const char *dest_fs_id, + gboolean same_fs, SourceInfo *source_info, SourceInfo *done_info) { - gboolean same_fs; GFile *dest; GError *error; gboolean overwrite; @@ -4653,11 +4652,6 @@ copy_file (CommonJob *job, overwrite = FALSE; - same_fs = FALSE; - if (dest_fs_id) { - same_fs = has_fs_id (src, dest_fs_id); - } - dest = get_target_file (src, dest_dir, same_fs); retry: @@ -4692,8 +4686,8 @@ copy_file (CommonJob *job, is_merge = TRUE; primary = strdup_with_name (_("A folder named \"%s\" already exists. Do you want to merge the source folder?"), dest); - secondary = strdup_with_full_name (_("The folder already exists in \"%s\". " - "Replacing it will overwrite any files in the folder that conflict with the files being copied."), + secondary = strdup_with_full_name (_("The source folder already exists in \"%s\". " + "Merging will ask for confirmation before replacing any files in the folder that conflict with the files being copied."), dest_dir); } else { @@ -4830,15 +4824,21 @@ copy_files (CommonJob *job, SourceInfo *done_info) { GList *l; - GFile *file; + GFile *src; + gboolean same_fs; for (l = files; l != NULL && !job->aborted ; l = l->next) { - file = l->data; + src = l->data; + + same_fs = FALSE; + if (dest_fs_id) { + same_fs = has_fs_id (src, dest_fs_id); + } - copy_file (job, file, dest_dir, - dest_fs_id, + copy_file (job, src, dest_dir, + same_fs, source_info, done_info); } |