Patch: user mime info directory monitoring fix
- From: Frederic Crozat <fcrozat mandrakesoft com>
- To: gnome-vfs-list gnome org
- Subject: Patch: user mime info directory monitoring fix
- Date: 04 Dec 2002 19:08:43 +0100
Hi,
The following patch fixes a small performance hit when fam is used for
file monitoring :
if fam is compiled with dnotify support and if you try to monitor
non-existing directory, fam fallbacks to parent directory polling, with
a 5s delay.. (it can be somehow energy hungry on laptop)
This patch ensure user gnome mime info directory always exists before
monitoring it..
Can I commit (with a ChangeLog entry, of course) ?
--
Frederic Crozat <fcrozat mandrakesoft com>
MandrakeSoft
--- gnome-vfs-2.1.3.1/libgnomevfs/gnome-vfs-mime-monitor.c.mimeinfo 2002-06-17 09:34:42.000000000 +0200
+++ gnome-vfs-2.1.3.1/libgnomevfs/gnome-vfs-mime-monitor.c 2002-12-04 16:46:44.000000000 +0100
@@ -113,6 +113,9 @@
g_free (mime_dir);
mime_dir = g_strconcat (g_get_home_dir (), "/.gnome/mime-info", NULL);
+ if (!g_file_test (mime_dir, G_FILE_TEST_EXISTS)) {
+ mkdir (mime_dir, S_IRWXU);
+ }
gnome_vfs_monitor_add (&monitor->priv->local_handle,
mime_dir,
GNOME_VFS_MONITOR_DIRECTORY,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]