X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Ftrav.c;h=4d02b5eab6304da17e9abf56e82d369b3bf3035f;hb=810bce66201f40acfd7e8577d3997e6ea385f1cf;hp=4c5d666b74bf24be77f274203c423de90c36a88c;hpb=5437b50633032595afe6f87dc0f989bc92a5aea8;p=idzebra-moved-to-github.git diff --git a/index/trav.c b/index/trav.c index 4c5d666..4d02b5e 100644 --- a/index/trav.c +++ b/index/trav.c @@ -1,6 +1,6 @@ -/* $Id: trav.c,v 1.46 2004-11-19 10:27:03 heikki Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 - Index Data Aps +/* $Id: trav.c,v 1.48 2005-05-09 19:57:35 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS This file is part of the Zebra server. @@ -312,7 +312,7 @@ static void fileUpdate (ZebraHandle zh, Dict dict, const char *path) else if (S_ISREG(sbuf.st_mode)) { struct dirs_entry *e_dst; - di = dirs_fopen (dict, src); + di = dirs_fopen (dict, src, zh->m_flag_rw); e_dst = dirs_read (di); if (e_dst) @@ -392,6 +392,24 @@ static void repositoryExtractG (ZebraHandle zh, const char *path, repositoryExtract (zh, deleteFlag, path); } +#if 0 +static int dump_file_dict_func(char *name, const char *info, int pos, + void *client) +{ + yaz_log(YLOG_LOG, "%s", name); + return 0; +} +static void dump_file_dict(Dict dict) +{ + int before = 10; + int after = 1000; + char term[1000]; + + strcpy(term, "0"); + dict_scan (dict, term, &before, &after, 0, dump_file_dict_func); +} +#endif + void repositoryUpdate (ZebraHandle zh, const char *path) { assert (path); @@ -412,7 +430,11 @@ void repositoryUpdate (ZebraHandle zh, const char *path) } else fileUpdate (zh, dict, path); +#if 0 + dump_file_dict(dict); +#endif dict_close (dict); + } else repositoryExtractG (zh, path, 0);