[Kazehakase-cvs] CVS update: kazehakase/src/utils

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
Mon Dec 4 11:33:35 JST 2006


Index: kazehakase/src/utils/utils.c
diff -u kazehakase/src/utils/utils.c:1.58 kazehakase/src/utils/utils.c:1.59
--- kazehakase/src/utils/utils.c:1.58	Wed Nov 29 00:22:25 2006
+++ kazehakase/src/utils/utils.c	Mon Dec  4 11:33:35 2006
@@ -31,6 +31,7 @@
 #include "gtk-utils.h"
 #include "config.h"
 #include "kazehakase.h"
+#include "kz-search.h"
 #include "egg-pixbuf-thumbnail.h"
 
 #define BUFFER_SIZE 1024
@@ -505,6 +506,8 @@
 	FILE *fp;
 	GTimeVal now;
 	time_t t;
+	KzSearch *search;
+	search = kz_search_new("hyperestraier");
 
 	g_get_current_time(&now);
 	t = now.tv_sec;
@@ -536,7 +539,14 @@
 				if (g_stat(path, &st) == 0 &&
 						t - st.st_mtime > limit_seconds)
 				{
-					/* remove file over storege period */
+					if (search)
+					{
+						gchar *filename;
+						filename = g_strdup_printf("file://%s", path);
+						kz_search_unregister_document(search, filename);
+						g_free(filename);
+					}
+					/* remove file over storage period */
 					g_unlink(path);
 					g_free(time);
 					g_free(path);
@@ -552,6 +562,9 @@
 		close(fd);
 		fclose(fp);
 	}
+
+	if (search)
+		g_object_unref(search);
 	g_unlink(timestamp_path);
 	g_rename(tmp_file, timestamp_path);
 }


More information about the Kazehakase-cvs mailing list
Back to archive index