diff --git a/gio/glocalfile.c b/gio/glocalfile.c index 0ad39853f..4bb9948d8 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -2532,6 +2532,12 @@ is_remote_fs_type (const gchar *fsname) return TRUE; if (strcmp (fsname, "nfs4") == 0) return TRUE; + if (strcmp (fsname, "cifs") == 0) + return TRUE; + if (strcmp (fsname, "smb") == 0) + return TRUE; + if (strcmp (fsname, "smb2") == 0) + return TRUE; } return FALSE; @@ -2540,7 +2546,7 @@ is_remote_fs_type (const gchar *fsname) gboolean g_local_file_is_nfs_home (const gchar *filename) { - static gboolean remote_home; + static gboolean remote_home = FALSE; static gsize initialized; const gchar *home; @@ -2557,7 +2563,8 @@ g_local_file_is_nfs_home (const gchar *filename) info = g_local_file_query_filesystem_info (file, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, NULL, NULL); if (info != NULL) fs_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE); - remote_home = is_remote_fs_type (fs_type); + if (g_strcmp0 (fs_type, "nfs") == 0 || g_strcmp0 (fs_type, "nfs4") == 0) + remote_home = TRUE; g_clear_object (&info); g_object_unref (file);