[gvfs/wip/antoniof/set-preview-type-explicitly: 2/4] afc: Set G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS




commit e24b7afdb58773b1d262170e19c2fb5f075808e3
Author: António Fernandes <antoniof gnome org>
Date:   Sun Jan 17 10:34:05 2021 +0000

    afc: Set G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS
    
    filesystem::preview-type used to be IF_LOCAL for this backedn but it
    has been unset by commit a71469c79fd31adfc594a55afd29a7ce2202b270
    
    The commit message says it should be treated as remote filesystems.
    However, filesystem::remote is set to FALSE, so application would
    still interpret this as local for previewing purposes.
    
    Set filesystem::preview-type to get the result expected by that commit.
    
    https://gitlab.gnome.org/GNOME/gvfs/-/issues/497

 daemon/gvfsbackendafc.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index 88817703..9c0d71fc 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -2186,6 +2186,7 @@ g_vfs_backend_afc_query_fs_info (GVfsBackend *backend,
 
   g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, "afc");
   g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE, FALSE);
+  g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW, 
G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS);
 
   if (!self->connected)
     {


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