gvfs r2168 - in trunk: . client
- From: hansp svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2168 - in trunk: . client
- Date: Tue, 13 Jan 2009 20:23:55 +0000 (UTC)
Author: hansp
Date: Tue Jan 13 20:23:55 2009
New Revision: 2168
URL: http://svn.gnome.org/viewvc/gvfs?rev=2168&view=rev
Log:
2009-01-13 Hans Petter Jansson <hpj novell com>
* client/gvfsfusedaemon.c (getattr_for_file)
(vfs_open)
(vfs_create)
(vfs_rmdir)
(vfs_access): Get only the attributes we require. This speeds up
directory listings in particular, since we don't need to probe
individual files to determine their MIME types.
Modified:
trunk/ChangeLog
trunk/client/gvfsfusedaemon.c
Modified: trunk/client/gvfsfusedaemon.c
==============================================================================
--- trunk/client/gvfsfusedaemon.c (original)
+++ trunk/client/gvfsfusedaemon.c Tue Jan 13 20:23:55 2009
@@ -751,7 +751,18 @@
GError *error = NULL;
gint result = 0;
- file_info = g_file_query_info (file, "*", 0, NULL, &error);
+ file_info = g_file_query_info (file,
+ G_FILE_ATTRIBUTE_STANDARD_TYPE ","
+ G_FILE_ATTRIBUTE_STANDARD_NAME ","
+ G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK ","
+ G_FILE_ATTRIBUTE_STANDARD_SIZE ","
+ G_FILE_ATTRIBUTE_UNIX_MODE ","
+ G_FILE_ATTRIBUTE_TIME_CHANGED ","
+ G_FILE_ATTRIBUTE_TIME_MODIFIED ","
+ G_FILE_ATTRIBUTE_TIME_ACCESS ","
+ G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE ","
+ G_FILE_ATTRIBUTE_UNIX_BLOCKS,
+ 0, NULL, &error);
if (file_info)
{
@@ -962,7 +973,7 @@
GFileInfo *file_info;
GError *error = NULL;
- file_info = g_file_query_info (file, "*", 0, NULL, &error);
+ file_info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TYPE, 0, NULL, &error);
if (file_info)
{
@@ -1046,7 +1057,7 @@
GFileInfo *file_info;
GError *error = NULL;
- file_info = g_file_query_info (file, "*", 0, NULL, &error);
+ file_info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TYPE, 0, NULL, &error);
if (file_info)
{
@@ -1687,7 +1698,7 @@
{
GFileInfo *file_info;
- file_info = g_file_query_info (file, "*", 0, NULL, &error);
+ file_info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TYPE, 0, NULL, &error);
if (file_info)
{
if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY)
@@ -1903,7 +1914,11 @@
{
GFileInfo *file_info;
- file_info = g_file_query_info (file, "*", 0, NULL, &error);
+ file_info = g_file_query_info (file,
+ G_FILE_ATTRIBUTE_ACCESS_CAN_READ ","
+ G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE ","
+ G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE ",",
+ 0, NULL, &error);
if (file_info)
{
if ((mode & R_OK && (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ) &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]