[nautilus/gnome-42] file: Fix remote filesystem check
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-42] file: Fix remote filesystem check
- Date: Tue, 10 May 2022 23:58:34 +0000 (UTC)
commit b2e3d3757d23bedf1ecada987c97a54e3ae78b6f
Author: Corey Berla <corey berla me>
Date: Tue May 10 09:43:46 2022 -0700
file: Fix remote filesystem check
Files are flagged as remote in file->details->filesystem_remote
through directory-async as folders are browsed.
nautilus_file_get_filesystem_remote() incorrectly returns FALSE for
child directories that have not been processed by directory-async
on a remote filesystem. This causes the "Count Number of Files in
Folders" options to not work correctly when set to "On This Computer
Only". Rather than unnecessarily process all of the child folders,
check whether filesystem_info_is_up_to_date==TRUE. If not,
check whether the parent is remote instead.
This issue was introduced in 99f55748ef69a68df86b9a039998ee576d59b898.
Previously the prefix of the URI was checked to match a hardcoded list.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2035
(cherry picked from commit 2ab0fcbdad71b6a9ebf94e0f65b1cb53f6219840)
src/nautilus-file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index f2102884d..c539ef029 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -4745,7 +4745,7 @@ nautilus_file_get_filesystem_remote (NautilusFile *file)
{
g_assert (NAUTILUS_IS_FILE (file));
- if (nautilus_file_is_directory (file))
+ if (nautilus_file_is_directory (file) && file->details->filesystem_info_is_up_to_date)
{
return file->details->filesystem_remote;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]