mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
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.
This commit is contained in:
parent
d067b5390a
commit
706dc6b5aa
@ -112,6 +112,10 @@ G_DEFINE_TYPE_WITH_CODE (GLocalFile, g_local_file, G_TYPE_OBJECT,
|
|||||||
|
|
||||||
static char *find_mountpoint_for (const char *file, dev_t dev, gboolean resolve_basename_symlink);
|
static char *find_mountpoint_for (const char *file, dev_t dev, gboolean resolve_basename_symlink);
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
|
static gboolean is_remote_fs (const gchar *filename);
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_local_file_finalize (GObject *object)
|
g_local_file_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
@ -1112,10 +1116,12 @@ g_local_file_query_filesystem_info (GFile *file,
|
|||||||
#endif /* G_OS_WIN32 */
|
#endif /* G_OS_WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
if (g_file_attribute_matcher_matches (attribute_matcher,
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE))
|
G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE))
|
||||||
g_file_info_set_attribute_boolean (info, 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));
|
||||||
|
#endif
|
||||||
|
|
||||||
g_file_attribute_matcher_unref (attribute_matcher);
|
g_file_attribute_matcher_unref (attribute_matcher);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user