Gvfs and xattr: how we can understand if the protocol support xattr

Hi all,

this is my first post in discourse.

I am patching the caja-xattr-tags extension. Basically the problem was that some protocols ( mpt:// in my case) don’t support xattr, but this extension still does query calling g_file_query_info and thus performing very bad.

So I am asking a generic way to detect if a protocol support xattr to avoid useless call to

g_file_query_info(  "xattr::..." )

when we know in advance that there will be not a valid result.

For now, the best way that I was able to found is to use a static blacklist.

I guess you want g_file_query_settable_attributes() and g_file_query_writable_namespaces().

It is easy, I am convinced that none of the GVfs backends support xattr, so you can simply check for “file://” URI scheme…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.