gnome-utils r8166 - in trunk/baobab: . src
- From: marzocca svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-utils r8166 - in trunk/baobab: . src
- Date: Sun, 26 Oct 2008 14:14:42 +0000 (UTC)
Author: marzocca
Date: Sun Oct 26 14:14:42 2008
New Revision: 8166
URL: http://svn.gnome.org/viewvc/gnome-utils?rev=8166&view=rev
Log:
Fixes #557226
Modified:
trunk/baobab/ChangeLog
trunk/baobab/src/baobab-scan.c
trunk/baobab/src/baobab-scan.h
trunk/baobab/src/baobab-utils.c
trunk/baobab/src/baobab-utils.h
Modified: trunk/baobab/src/baobab-scan.c
==============================================================================
--- trunk/baobab/src/baobab-scan.c (original)
+++ trunk/baobab/src/baobab-scan.c Sun Oct 26 14:14:42 2008
@@ -30,7 +30,7 @@
#include <gio/gio.h>
#include "baobab.h"
-#include "baobab-scan.h"
+#include "baobab-utils.h"
/*
@@ -133,25 +133,6 @@
G_FILE_ATTRIBUTE_UNIX_NLINK "," \
G_FILE_ATTRIBUTE_ACCESS_CAN_READ;
-static gboolean
-is_virtual_filesystem (GFile *file)
-{
- gboolean ret = FALSE;
- char *path;
-
- path = g_file_get_path (file);
-
- /* FIXME: we need a better way to check virtual FS */
- if (path != NULL) {
- if ((strcmp (path, "/proc") == 0) ||
- (strcmp (path, "/sys") == 0))
- ret = TRUE;
- }
-
- g_free (path);
-
- return ret;
-}
static gboolean
is_in_dot_gvfs (GFile *file)
Modified: trunk/baobab/src/baobab-scan.h
==============================================================================
--- trunk/baobab/src/baobab-scan.h (original)
+++ trunk/baobab/src/baobab-scan.h Sun Oct 26 14:14:42 2008
@@ -27,4 +27,5 @@
void baobab_scan_execute (GFile *location);
+
#endif /* __BAOBAB_SCAN_H__ */
Modified: trunk/baobab/src/baobab-utils.c
==============================================================================
--- trunk/baobab/src/baobab-utils.c (original)
+++ trunk/baobab/src/baobab-utils.c Sun Oct 26 14:14:42 2008
@@ -40,6 +40,7 @@
#include "baobab-utils.h"
#include "callbacks.h"
+
void
baobab_get_filesystem (baobab_fs *fs)
{
@@ -294,7 +295,9 @@
return FALSE;
}
- if (g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY) {
+ if ((g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY) ||
+ is_virtual_filesystem(file)) {
+
char *error_msg = NULL;
gchar *name = NULL;
@@ -574,3 +577,23 @@
return ret;
}
+
+gboolean
+is_virtual_filesystem (GFile *file)
+{
+ gboolean ret = FALSE;
+ char *path;
+
+ path = g_file_get_path (file);
+
+ /* FIXME: we need a better way to check virtual FS */
+ if (path != NULL) {
+ if ((strcmp (path, "/proc") == 0) ||
+ (strcmp (path, "/sys") == 0))
+ ret = TRUE;
+ }
+
+ g_free (path);
+
+ return ret;
+}
Modified: trunk/baobab/src/baobab-utils.h
==============================================================================
--- trunk/baobab/src/baobab-utils.h (original)
+++ trunk/baobab/src/baobab-utils.h Sun Oct 26 14:14:42 2008
@@ -47,5 +47,6 @@
void set_glade_widget_sens (const gchar *name, gboolean sens);
gchar *baobab_gconf_get_string_with_default (GConfClient *client, const gchar *key, const gchar *def);
gboolean baobab_help_display (GtkWindow *parent, const gchar *file_name, const gchar *link_id);
+gboolean is_virtual_filesystem (GFile *file);
#endif /* __BAOBAB_UTILS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]