[nautilus/wip/csoriano/destktop-split2: 27/27] dnd: query the file info



commit e07751cac06b874ee6cdd20896d0b333016a690e
Author: Carlos Soriano <csoriano gnome org>
Date:   Fri Mar 18 13:33:48 2016 +0100

    dnd: query the file info
    
    When dnd, we request if the file system of the destination folder and
    the dragged files are the same, in order to decide between making a copy
    or a move operation.
    
    However, now that the desktop is in another binary, we no longer have in
    cache all the files that the user is working with neither in nautilus
    or nautilus-desktop.
    
    This means that the file system information is null most of the times,
    since nautilus doesn't have enough time to request the info to the HD,
    and therefore we always do a copy operation instead of a move if dnd
    between nautilus and nautilus desktop.
    
    We can try to find a solution for this, but I'm not sure it will worth
    it.

 libnautilus-private/nautilus-dnd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index dce90cc..6ac1715 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -190,7 +190,7 @@ nautilus_drag_build_selection_list (GtkSelectionData *data)
                item->uri = g_malloc (len + 1);
                memcpy (item->uri, oldp, len);
                item->uri[len] = 0;
-               item->file = nautilus_file_get_existing_by_uri (item->uri);
+               item->file = nautilus_file_get_by_uri (item->uri);
 
                p++;
                if (*p == '\n' || *p == '\0') {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]