[glib/wip/oholy/remote-attribute-fixes: 3/7] glocalfile: Fix G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE outside home
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/oholy/remote-attribute-fixes: 3/7] glocalfile: Fix G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE outside home
- Date: Wed, 17 Jun 2020 08:21:07 +0000 (UTC)
commit 42b84e84d8fae71573433d550ea9d77e66bf3470
Author: Ondrej Holy <oholy redhat com>
Date: Mon Jun 15 17:14:30 2020 +0200
glocalfile: Fix G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE outside home
The G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE currently works only for locations
in the home directory. Let's make it work also for files outside the home
directory.
gio/glocalfile.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index 1effea5fa..69d4c27dd 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -111,6 +111,7 @@ G_DEFINE_TYPE_WITH_CODE (GLocalFile, g_local_file, G_TYPE_OBJECT,
g_local_file_file_iface_init))
static char *find_mountpoint_for (const char *file, dev_t dev, gboolean resolve_basename_symlink);
+static gboolean is_remote_fs (const gchar *filename);
static void
g_local_file_finalize (GObject *object)
@@ -1115,7 +1116,7 @@ g_local_file_query_filesystem_info (GFile *file,
if (g_file_attribute_matcher_matches (attribute_matcher,
G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE))
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE,
- g_local_file_is_remote (local->filename));
+ is_remote_fs (local->filename));
g_file_attribute_matcher_unref (attribute_matcher);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]