aboutsummaryrefslogtreecommitdiffstats
path: root/libibex
diff options
context:
space:
mode:
author0 <NotZed@Ximian.com>2001-10-30 12:33:44 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-30 12:33:44 +0800
commitef9b8189dcdedf3995d160c11490b8c454819e90 (patch)
tree25e83e0097afde20b8f796c53e72a585b0a87d9e /libibex
parent5f61594790c51540b9d48ffb7383223b318710ac (diff)
downloadgsoc2013-evolution-ef9b8189dcdedf3995d160c11490b8c454819e90.tar
gsoc2013-evolution-ef9b8189dcdedf3995d160c11490b8c454819e90.tar.gz
gsoc2013-evolution-ef9b8189dcdedf3995d160c11490b8c454819e90.tar.bz2
gsoc2013-evolution-ef9b8189dcdedf3995d160c11490b8c454819e90.tar.lz
gsoc2013-evolution-ef9b8189dcdedf3995d160c11490b8c454819e90.tar.xz
gsoc2013-evolution-ef9b8189dcdedf3995d160c11490b8c454819e90.tar.zst
gsoc2013-evolution-ef9b8189dcdedf3995d160c11490b8c454819e90.zip
If we can't open blocks, dont try to deref it.
2001-10-30 <NotZed@Ximian.com> * ibex_block.c (ibex_reset): If we can't open blocks, dont try to deref it. svn path=/trunk/; revision=14423
Diffstat (limited to 'libibex')
-rw-r--r--libibex/ChangeLog5
-rw-r--r--libibex/ibex_block.c8
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;
}