diff options
author | António Fernandes <antoniof@gnome.org> | 2020-05-16 14:18:34 +0100 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2021-01-25 10:54:11 +0000 |
commit | 93ef35d814d6cfb3268f81ad786068fb83ec0c7a (patch) | |
tree | ae2b3ebf421429b03e225590e0adb772d4fab9bc | |
parent | d0882432ab787aaf05bcd46a2111ac993bcaf80d (diff) | |
download | nautilus-93ef35d814d6cfb3268f81ad786068fb83ec0c7a.tar.gz |
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
-rw-r--r-- | src/nautilus-directory.c | 3 |
1 files changed, 1 insertions, 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); } |