Hiroyuki Ikezoe
ikezo****@users*****
Wed Dec 6 11:04:52 JST 2006
Index: kazehakase/module/search/kz-anthy-trainer.c diff -u kazehakase/module/search/kz-anthy-trainer.c:1.1 kazehakase/module/search/kz-anthy-trainer.c:1.2 --- kazehakase/module/search/kz-anthy-trainer.c:1.1 Tue Dec 5 21:22:30 2006 +++ kazehakase/module/search/kz-anthy-trainer.c Wed Dec 6 11:04:51 2006 @@ -229,7 +229,6 @@ surface = g_new0(gchar, node->length + 2); g_snprintf(surface, node->length+1, "%s", node->surface); - g_warning("%s: %s", surface, node->feature); g_free(surface); } Index: kazehakase/module/search/kz-search-hyper-estraier.c diff -u kazehakase/module/search/kz-search-hyper-estraier.c:1.12 kazehakase/module/search/kz-search-hyper-estraier.c:1.13 --- kazehakase/module/search/kz-search-hyper-estraier.c:1.12 Tue Dec 5 14:52:19 2006 +++ kazehakase/module/search/kz-search-hyper-estraier.c Wed Dec 6 11:04:51 2006 @@ -416,6 +416,7 @@ int ret, ecode, success; gchar *time_str, *filename, *text = NULL; gchar *utf8 = NULL; + gchar *tmp_filename, *tmp_path; KzSearchHyperEstraierPrivate *priv = KZ_SEARCH_HYPER_ESTRAIER_GET_PRIVATE(search); db = est_db_open(priv->dbname, ESTDBWRITER | ESTDBCREAT, &ecode); @@ -427,7 +428,11 @@ doc = est_doc_new(); - filename = g_strdup_printf("file://%s", uri); + tmp_filename = create_filename_with_path_from_uri(uri); + tmp_path = g_build_filename(g_get_home_dir(), HISTORY_DIR, tmp_filename, NULL); + filename = g_strdup_printf("file://%s", tmp_path); + g_free(tmp_path); + g_free(tmp_filename); est_doc_add_attr(doc, ESTDATTRURI, filename); g_free(filename); @@ -536,11 +541,16 @@ { GDir *gd; const gchar *file; + gchar *dirname; + size_t len; gd = g_dir_open(path, 0, NULL); if (!gd) return; + dirname = g_build_filename(g_get_home_dir(), HISTORY_DIR, NULL); + len = strlen(dirname); + g_free(dirname); while ((file = g_dir_read_name (gd))) { gchar *new_path = g_build_filename (path, file, NULL); @@ -556,7 +566,7 @@ g_stat(new_path, &st); mtime = st.st_mtime; - uri = g_strdup_printf("file://%s", new_path); + uri = create_uri_from_filename(new_path+strlen("file://")+len); g_file_get_contents(new_path, &contents, NULL, NULL); kz_search_register_document(search, uri, NULL, NULL, contents, mtime);