diff options
author | Ernestas Kulik <ernestask@src.gnome.org> | 2016-07-16 13:20:12 +0300 |
---|---|---|
committer | Ernestas Kulik <ernestask@src.gnome.org> | 2016-07-18 13:13:49 +0300 |
commit | 9367523a3dd4ecc63a2460f7c4e45ab1eb447189 (patch) | |
tree | 7bb06a0d7697ab2864a582adb6b26fc6bbdb0042 | |
parent | 16382ad12374ba7399a0281653d115c7bbb05eb1 (diff) | |
download | nautilus-9367523a3dd4ecc63a2460f7c4e45ab1eb447189.tar.gz |
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
-rw-r--r-- | libnautilus-private/nautilus-directory.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libnautilus-private/nautilus-directory.c b/libnautilus-private/nautilus-directory.c index 7b8da1605..57ac86636 100644 --- a/libnautilus-private/nautilus-directory.c +++ b/libnautilus-private/nautilus-directory.c @@ -567,20 +567,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 |