diff --git a/PROMS/DataLoader/RoFst.cs b/PROMS/DataLoader/RoFst.cs index 5f8b4c31..50f5b989 100644 --- a/PROMS/DataLoader/RoFst.cs +++ b/PROMS/DataLoader/RoFst.cs @@ -73,12 +73,14 @@ namespace DataLoader // now see if the same ro.fst has been migrated. To determine this check if a record // exists for the rodb and with the same dts as the file. FileInfo fi = new FileInfo(fstPath + @"\ro.fst"); - + if (!fi.Exists) + fi = new FileInfo(roDbpath + @"\ro.fst"); + ROFst rofst = ROFst.GetByRODbID_DTS(rodb.RODbID, fi.LastWriteTimeUtc); - if (rofst == null) + if (rofst == null) // if not already in our database, then add it. { // Next read in the rofst & make the rofst record. - FileStream fsIn = new FileStream(fstPath + @"\ro.fst", FileMode.Open, FileAccess.Read, FileShare.Read); + FileStream fsIn = new FileStream(fi.FullName, FileMode.Open, FileAccess.Read, FileShare.Read); // Create an instance of StreamReader that can read characters from the FileStream. BinaryReader r = new BinaryReader(fsIn); byte[] ab = r.ReadBytes((int)fsIn.Length);