- Fix dragging files via NFS moves instead of copy (#456515)

This commit is contained in:
Tomas Bzatek 2009-04-06 13:08:54 +00:00
parent a55a6ed8b9
commit af74ec5411
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,31 @@
Index: libnautilus-private/nautilus-dnd.c
===================================================================
--- libnautilus-private/nautilus-dnd.c (revision 15162)
+++ libnautilus-private/nautilus-dnd.c (revision 15163)
@@ -437,7 +437,7 @@
gboolean target_is_source_parent;
gboolean source_deletable;
const char *dropped_uri;
- GFile *target, *dropped;
+ GFile *target, *dropped, *dropped_directory;
GdkDragAction actions;
NautilusFile *dropped_file, *target_file;
@@ -519,7 +519,16 @@
/* Compare the first dropped uri with the target uri for same fs match. */
dropped = g_file_new_for_uri (dropped_uri);
- target_is_source_parent = g_file_has_prefix (dropped, target);
+ dropped_directory = g_file_get_parent (dropped);
+ target_is_source_parent = FALSE;
+ if (dropped_directory != NULL) {
+ /* If the dropped file is already in the same directory but
+ is in another filesystem we still want to move, not copy
+ as this is then just a move of a mountpoint to another
+ position in the dir */
+ target_is_source_parent = g_file_equal (dropped_directory, target);
+ g_object_unref (dropped_directory);
+ }
source_deletable = source_is_deletable (dropped);
if ((same_fs && source_deletable) || target_is_source_parent ||

View File

@ -16,7 +16,7 @@
Name: nautilus Name: nautilus
Summary: File manager for GNOME Summary: File manager for GNOME
Version: 2.26.1 Version: 2.26.1
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Group: User Interface/Desktops Group: User Interface/Desktops
Source: http://download.gnome.org/sources/%{name}/2.26/%{name}-%{version}.tar.bz2 Source: http://download.gnome.org/sources/%{name}/2.26/%{name}-%{version}.tar.bz2
@ -87,6 +87,10 @@ Patch10: nautilus-gvfs-desktop-key-2.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=519743 # http://bugzilla.gnome.org/show_bug.cgi?id=519743
Patch17: nautilus-filetype-symlink-fix.patch Patch17: nautilus-filetype-symlink-fix.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=456515
# Dragging Files via NFS share moves instead of copy
Patch18: nautilus-2.26.1-dnd-not-recurse.patch
%description %description
Nautilus is the file manager and graphical shell for the GNOME desktop Nautilus is the file manager and graphical shell for the GNOME desktop
@ -125,6 +129,7 @@ for developing nautilus extensions.
# %patch8 -p1 -b .hide-white-screen # %patch8 -p1 -b .hide-white-screen
%patch10 -p1 -b .gvfs-desktop-key %patch10 -p1 -b .gvfs-desktop-key
%patch17 -p0 -b .symlink %patch17 -p0 -b .symlink
%patch18 -p0 -b .dnd-recurse
%build %build
@ -262,6 +267,9 @@ fi
%changelog %changelog
* Mon Apr 6 2009 Tomas Bzatek <tbzatek@redhat.com> - 2.26.1-2
- Fix dragging files via NFS moves instead of copy (#456515)
* Thu Apr 2 2009 Tomas Bzatek <tbzatek@redhat.com> - 2.26.1-1 * Thu Apr 2 2009 Tomas Bzatek <tbzatek@redhat.com> - 2.26.1-1
- Update to 2.26.1 - Update to 2.26.1