1 --- gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-xfer.c 2005-04-13 09:09:29.000000000 +0530
2 +++ archana-gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-xfer.c 2005-04-13 10:41:54.819357496 +0530
3 @@ -2115,9 +2115,36 @@ gnome_vfs_xfer_uri_internal (const GList
5 source_uri = source_uri->next, target_uri = target_uri->next) {
9 + GnomeVFSURI *trash_uri;
10 + GnomeVFSFileInfo *file_info;
12 g_assert (target_dir_uri != NULL);
14 + /* For local uris, don't set the move option to copy/remove where remove
17 + file_info = gnome_vfs_file_info_new ();
19 + trash_dir = g_strconcat (g_get_home_dir (), "/.Trash", NULL);
20 + trash_uri = gnome_vfs_uri_new (trash_dir);
22 + result = gnome_vfs_get_file_info_uri ((GnomeVFSURI *)(source_uri->data),
24 + GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS);
26 + is_local = gnome_vfs_uri_is_local ((GnomeVFSURI *)(source_uri->data));
28 + if (result == GNOME_VFS_OK && ! strcmp (target_dir_uri->text, trash_uri->text)) {
29 + if (is_local && (file_info->permissions & GNOME_VFS_PERM_ACCESS_WRITABLE) != 0) {
30 + goto change_operation_move;
33 + goto dont_change_operation_move;
36 +change_operation_move:
37 result = gnome_vfs_check_same_fs_uris ((GnomeVFSURI *)source_uri->data,
38 target_dir_uri, &same_fs);
40 @@ -2126,6 +2153,10 @@ gnome_vfs_xfer_uri_internal (const GList
44 +dont_change_operation_move:
46 + gnome_vfs_uri_unref (trash_uri);
47 + gnome_vfs_file_info_unref (file_info);