diff options
Diffstat (limited to 'libibex')
-rw-r--r-- | libibex/ChangeLog | 5 | ||||
-rw-r--r-- | libibex/ibex_block.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/libibex/ChangeLog b/libibex/ChangeLog index 5c17fab03e..15e7296eea 100644 --- a/libibex/ChangeLog +++ b/libibex/ChangeLog @@ -1,3 +1,8 @@ +2001-10-30 <NotZed@Ximian.com> + + * ibex_block.c (ibex_reset): If we can't open blocks, dont try to + deref it. + 2001-10-29 <NotZed@Ximian.com> * ibex_block.c (ibex_move): Always rename file even if mv failed. diff --git a/libibex/ibex_block.c b/libibex/ibex_block.c index 5ac538346b..74eb594ad6 100644 --- a/libibex/ibex_block.c +++ b/libibex/ibex_block.c @@ -450,9 +450,10 @@ ibex_reset(ibex *ib) ib->blocks = ibex_block_cache_open(ib->name, ib->flags, ib->mode); if (ib->blocks == 0) { g_warning("ibex_reset create: Error occured?: %s\n", strerror(errno)); + } else { + /* FIXME: the blockcache or the wordindex needs to manage the other one */ + ib->words = ib->blocks->words; } - /* FIXME: the blockcache or the wordindex needs to manage the other one */ - ib->words = ib->blocks->words; } /** @@ -494,7 +495,7 @@ int ibex_close (ibex *ib) /* rename/move the ibex file */ int ibex_move(ibex *ib, const char *newname) { - int ret = 0, error; + int ret = 0, error = 0; IBEX_LOCK(ib); @@ -502,6 +503,7 @@ int ibex_move(ibex *ib, const char *newname) close_backend(ib); if (rename(ib->name, newname) == -1) { + g_warning("could not rename ibex file '%s' to '%s': '%s'", ib->name, newname, strerror(errno)); ret = -1; error = errno; } |