diff options
Diffstat (limited to 'src/storage/ngram.cpp')
-rw-r--r-- | src/storage/ngram.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/storage/ngram.cpp b/src/storage/ngram.cpp index fedd744..f7dd347 100644 --- a/src/storage/ngram.cpp +++ b/src/storage/ngram.cpp @@ -20,6 +20,7 @@ */ #include <stdio.h> +#include <errno.h> #include <glib.h> #include <glib/gstdio.h> #include "memory_chunk.h" @@ -273,7 +274,7 @@ bool Bigram::save_db(const char * dbfile){ DB * tmp_db = NULL; int ret = g_unlink(dbfile); - if ( ret != 0 ) + if ( ret != 0 && errno != ENOENT) return false; ret = db_create(&tmp_db, NULL, 0); |