From: handa Date: Thu, 1 Mar 2007 11:53:54 +0000 (+0000) Subject: (mdatabase__check): If necessary, update database and X-Git-Tag: FLT-base~123 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e7dc5e631adbf81e6a1cdad6c836dc40c106b7b;p=m17n%2Fm17n-lib.git (mdatabase__check): If necessary, update database and find a new file. --- diff --git a/src/database.c b/src/database.c index 5695ea0..108dcf8 100644 --- a/src/database.c +++ b/src/database.c @@ -1058,6 +1058,17 @@ mdatabase__check (MDatabase *mdb) return -1; if (db_info->time < buf.st_mtime) return 0; + if (db_info->status == MDB_STATUS_AUTO + && db_info->filename != db_info->absolute_filename) + { + MDatabase *new; + + mdatabase__update (); + new = find_database (mdb->tag); + if (new != mdb) + return 0; + } + return 1; }