Commit b2db9fa6 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Avoid constantly trying to create directory monitors if it fails once by

2008-03-26  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-private/nautilus-monitor.c:
        (nautilus_monitor_directory):
	Avoid constantly trying to create directory monitors
	if it fails once by returning an "empty"
	NautilusMonitor instead of NULL.


svn path=/trunk/; revision=13984
parent f20ce9dd
2008-03-26 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-monitor.c:
(nautilus_monitor_directory):
Avoid constantly trying to create directory monitors
if it fails once by returning an "empty"
NautilusMonitor instead of NULL.
2008-03-24 Christian Neumair <cneumair@gnome.org>
* src/file-manager/fm-directory-view.c
......
......@@ -126,15 +126,14 @@ nautilus_monitor_directory (GFile *location)
dir_monitor = g_file_monitor_directory (location, G_FILE_MONITOR_WATCH_MOUNTS, NULL, NULL);
if (dir_monitor == NULL) {
return NULL;
}
ret = g_new0 (NautilusMonitor, 1);
ret->monitor = dir_monitor;
g_signal_connect (ret->monitor, "changed", (GCallback)dir_changed, ret);
if (ret->monitor) {
g_signal_connect (ret->monitor, "changed", (GCallback)dir_changed, ret);
}
/* We return a monitor even on failure, so we can avoid later trying again */
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment