From 8e7dc5e631adbf81e6a1cdad6c836dc40c106b7b Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 1 Mar 2007 11:53:54 +0000 Subject: [PATCH] (mdatabase__check): If necessary, update database and find a new file. --- src/database.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; } -- 1.7.10.4