[nautilus] directory: fix nautilus_directory_is_local()



commit 64de32cad119a0cd4f01d68b9825ff8db5c966a9
Author: Ernestas Kulik <ernestask src gnome org>
Date:   Sat Jul 16 13:20:12 2016 +0300

    directory: fix nautilus_directory_is_local()
    
    g_file_is_native() should be enough to decide whether the file is local.
    Checking if g_file_get_path() returns a native path lets us know if the
    directory is possibly made available by use of FUSE and there is
    nautilus_directory_is_local_or_fuse() for that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768733

 src/nautilus-directory.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-directory.c b/src/nautilus-directory.c
index 3595406..5be5144 100644
--- a/src/nautilus-directory.c
+++ b/src/nautilus-directory.c
@@ -642,20 +642,15 @@ nautilus_directory_new (GFile *location)
 gboolean
 nautilus_directory_is_local (NautilusDirectory *directory)
 {
-  g_autofree char* path = NULL;
-
        g_return_val_if_fail (NAUTILUS_IS_DIRECTORY (directory), FALSE);
 
        if (directory->details->location == NULL) {
                return TRUE;
        }
 
-  path = g_file_get_path (directory->details->location);
-
        return nautilus_directory_is_in_trash (directory) ||
                nautilus_directory_is_in_recent (directory) ||
-              g_file_is_native (directory->details->location) ||
-         path != NULL;
+              g_file_is_native (directory->details->location);
 }
 
 gboolean


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