[nautilus/wip/antoniof/local_vs_native_fixup: 84/90] directory: Revert b60f861638f11117174d435860f2409963489995




commit 93ef35d814d6cfb3268f81ad786068fb83ec0c7a
Author: António Fernandes <antoniof gnome org>
Date:   Sat May 16 14:18:34 2020 +0100

    directory: Revert b60f861638f11117174d435860f2409963489995
    
    The nautilus_[directory,file]_is_local() methods have been confounding
    the concepts of "native" and "non-remote" files, ever since the port
    from gnome-vfs to GIO in 59511dfee330102ee42e09bef37cbc9cd12973c6
    
    This conceptual mismatch is notorious in the Trash location, which is
    neither native nor remote. This soon raised a bug [1], which has been
    worked around by introducing a check for nautilus_file_is_in_trash().
    
    Now, after the previous commits, the is_local() methods are no longer
    employed to check that files are "non-remote". Instead, we now use
    nautilus_file_is_remote(), which correctly reports that the trash is
    not remote.
    
    So, this workaround can be droped now.
    
    [1] https://bugzilla.gnome.org/show_bug.cgi?id=546353

 src/nautilus-directory.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/nautilus-directory.c b/src/nautilus-directory.c
index 3b1556a37..392a67fbc 100644
--- a/src/nautilus-directory.c
+++ b/src/nautilus-directory.c
@@ -771,8 +771,7 @@ nautilus_directory_is_local (NautilusDirectory *directory)
         return TRUE;
     }
 
-    return nautilus_directory_is_in_trash (directory) ||
-           nautilus_directory_is_in_recent (directory) ||
+    return nautilus_directory_is_in_recent (directory) ||
            g_file_is_native (directory->details->location);
 }
 


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