summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2020-05-16 23:54:56 +0100
committerOndrej Holy <oholy@redhat.com>2021-01-25 10:54:11 +0000
commite327f8f44597d9829586acee66ff7f83149313ee (patch)
tree38d121d97c4dda6f56a5db9a83738e53956c6dbc
parent504fd9e0037e6fc4c6e13ef858b72e32ce5f11ce (diff)
downloadnautilus-e327f8f44597d9829586acee66ff7f83149313ee.tar.gz
directory: Replace obsolete early return with precondition
The early "return TRUE;" was added because gnome-vfs didn't have a way to represent all URIs: 5baaa578051f2f1249a518c256d84d04f221011a When nautilus was ported to GIO, this early return was kept despite GnomeVFSURI being superceeded by GFile, which can represent any URI: 469047a2a58430026d68a3b99b223b922b18b8d1 This early return should never happen, because a non-NULL location is always set.
-rw-r--r--src/nautilus-directory.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/nautilus-directory.c b/src/nautilus-directory.c
index d9a91904e..de7cb4ead 100644
--- a/src/nautilus-directory.c
+++ b/src/nautilus-directory.c
@@ -780,11 +780,7 @@ nautilus_directory_is_local_or_fuse (NautilusDirectory *directory)
g_autofree char *path = NULL;
g_return_val_if_fail (NAUTILUS_IS_DIRECTORY (directory), FALSE);
-
- if (directory->details->location == NULL)
- {
- return TRUE;
- }
+ g_return_val_if_fail (directory->details->location, FALSE);
/* If the glib reports a path, then it can use FUSE to convert the uri
* to a local path