From a30f8df3c8bbfa877ec607a82b9057b4a3dd11b8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 17 May 2008 06:08:08 +0000 Subject: [PATCH] fix free space information for ncpfs svn path=/trunk/; revision=6902 --- gio/ChangeLog | 7 +++++++ gio/glocalfile.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index a1381d3..491c2b5 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,5 +1,12 @@ 2008-05-17 Matthias Clasen + Bug 532965 – Should not return filesystem::free for certain file systems + + * glocalfile.c (g_local_file_query_filesystem_info) Don't return + free space for ncpfs. + +2008-05-17 Matthias Clasen + Bug 530196 – _g_local_file_has_trash_dir() doesn't handle st_dev == 0 * glocalfile.c (_g_local_file_has_trash_dir): Handle the case that diff --git a/gio/glocalfile.c b/gio/glocalfile.c index 782e90e..ed40ea6 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -968,7 +968,8 @@ g_local_file_query_filesystem_info (GFile *file, attribute_matcher = g_file_attribute_matcher_new (attributes); - if (g_file_attribute_matcher_matches (attribute_matcher, + if (!no_size && + g_file_attribute_matcher_matches (attribute_matcher, G_FILE_ATTRIBUTE_FILESYSTEM_FREE)) { #ifdef G_OS_WIN32 @@ -984,7 +985,8 @@ g_local_file_query_filesystem_info (GFile *file, g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE, block_size * statfs_buffer.f_bavail); #endif } - if (g_file_attribute_matcher_matches (attribute_matcher, + if (!no_size && + g_file_attribute_matcher_matches (attribute_matcher, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE)) { #ifdef G_OS_WIN32 -- 2.7.4