for (int i = 0; i < mdbs.Count; i++)
if (mdbs[i].ListIndex == mdb.ListIndex)
{
+
mdbs[i].DBStatus = MDBStatus.INVALID;
mdbs[i] = mdb;
return;
for (int i = 0; i < mdbs.Count; i++)
{
mdb = mdbs[i];
- if (mdb.ListIndex == list_idx
- && (dir_idx > 0 && dir_idx <= mdb.DirIndex))
+ if (mdb.ListIndex == list_idx)
{
if (mdb.DBStatus == MDBStatus.INVALID)
M17n.DebugPrint ("registering: {0}\n", mdb);
else
M17n.DebugPrint ("updating: {0}\n", mdb);
- if (mdb.DBStatus != MDBStatus.DISABLED)
- mdb.DBStatus = (dir_idx < 0
- ? MDBStatus.NOT_READY : MDBStatus.READY);
+ mdb.DBType = dir_idx == -1 ? MDBType.AUTO : MDBType.MULTIPLE;
+ mdb.DBStatus = MDBStatus.NOT_READY;
mdb.DirIndex = dir_idx;
mdb.Info = info;
return;
mdb.expand_wildcard ();
}
- private bool check_file ()
+ private bool update_status ()
{
+ if (DBType == MDBType.UNKNOWN)
+ return true;
+ if (DBStatus == MDBStatus.READY
+ && FileInfo != null)
+ {
+ FileInfo.Refresh ();
+ if (CheckedTime >= FileInfo.LastWriteTime)
+ return true;
+
+
+ {
+ FileInfo[] files
+ = DBDirs[DirIndex].DirInfo.GetFiles (Info.Filename);
+ if (files.Count > 0)
+ FileInfo = files[0];
+ }
+
+ }
+
if (DBDirs[DirIndex].DirInfo == null)
return false;
FileInfo[] files = DBDirs[DirIndex].DirInfo.GetFiles (Info.Filename);