| 571 |
usePlugIn : Boolean; |
usePlugIn : Boolean; |
| 572 |
islog : Boolean; |
islog : Boolean; |
| 573 |
urlHead: String; |
urlHead: String; |
| 574 |
|
datFileCheck: Boolean; |
| 575 |
{* |
{* |
| 576 |
FavoThreadItem : TFavoriteThreadItem; |
FavoThreadItem : TFavoriteThreadItem; |
| 577 |
Node: TTreeNode; |
Node: TTreeNode; |
| 578 |
*} |
*} |
| 579 |
begin |
{$IFDEF DEBUG} |
| 580 |
|
st, rt: Cardinal; |
| 581 |
|
{$ENDIF} |
| 582 |
|
begin |
| 583 |
|
{$IFDEF DEBUG} |
| 584 |
|
st := GetTickCount; |
| 585 |
|
{$ENDIF} |
| 586 |
if Board.IsThreadDatRead then |
if Board.IsThreadDatRead then |
| 587 |
Exit; |
Exit; |
| 588 |
Board.Clear; |
Board.Clear; |
| 598 |
|
|
| 599 |
FileName := Board.GetFolderIndexFileName; |
FileName := Board.GetFolderIndexFileName; |
| 600 |
|
|
| 601 |
FileList := TStringList.Create; |
// |
| 602 |
FileList.Sorted := True; |
datFileCheck := (Setting.CheckDatFile) or (not FileExists(FileName)); |
| 603 |
FileList.BeginUpdate; |
if (datFileCheck) then begin |
| 604 |
//IsLogFile用DATファイルリスト |
FileList := TStringList.Create; |
| 605 |
GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.dat', FileList, False); |
FileList.Sorted := True; |
| 606 |
FileList.EndUpdate; |
FileList.BeginUpdate; |
| 607 |
|
//IsLogFile用DATファイルリスト |
| 608 |
|
GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.dat', FileList, False); |
| 609 |
|
FileList.EndUpdate; |
| 610 |
|
end; |
| 611 |
|
|
| 612 |
// 重複を防ぐ |
// 重複を防ぐ |
| 613 |
Board.BeginUpdate; |
Board.BeginUpdate; |
| 619 |
//2行目から(1行目はバージョン) |
//2行目から(1行目はバージョン) |
| 620 |
for i := sl.Count - 1 downto 1 do begin |
for i := sl.Count - 1 downto 1 do begin |
| 621 |
Rec := ParseIndexLine(sl[i]); |
Rec := ParseIndexLine(sl[i]); |
| 622 |
islog := FileList.Find( Rec.FFileName, Index ); |
if (datFileCheck) then begin |
| 623 |
|
islog := FileList.Find( Rec.FFileName, Index ); |
| 624 |
|
end else begin |
| 625 |
|
islog := (Rec.FSize <> 0) and (Rec.FCount <> 0); |
| 626 |
|
end; |
| 627 |
if usePlugIn then |
if usePlugIn then |
| 628 |
ThreadItem := TThreadItem.Create( |
ThreadItem := TThreadItem.Create( |
| 629 |
Board.BoardPlugIn, |
Board.BoardPlugIn, |
| 650 |
end; |
end; |
| 651 |
|
|
| 652 |
ThreadItem.BeginUpdate; |
ThreadItem.BeginUpdate; |
| 653 |
if islog then |
if (datFileCheck) and (islog) then |
| 654 |
FileList.Delete( Index ); |
FileList.Delete( Index ); |
| 655 |
|
|
| 656 |
ThreadItem.No := Rec.FNo; |
ThreadItem.No := Rec.FNo; |
| 685 |
if UnRead <> Board.UnRead then |
if UnRead <> Board.UnRead then |
| 686 |
Board.UnRead := UnRead; |
Board.UnRead := UnRead; |
| 687 |
|
|
| 688 |
//インデックスに無かったログを追加(腐れインデックス対応) |
if (datFileCheck) then begin |
| 689 |
AddOutofIndexDat(Board, FileList); |
//インデックスに無かったログを追加(腐れインデックス対応) |
| 690 |
|
AddOutofIndexDat(Board, FileList); |
| 691 |
|
end; |
| 692 |
Board.EndUpdate; |
Board.EndUpdate; |
| 693 |
|
|
| 694 |
//前回異常終了時チェック |
//前回異常終了時チェック |
| 695 |
RestoreThreadData( Board ); |
RestoreThreadData( Board ); |
| 696 |
finally |
finally |
| 697 |
sl.Free; |
sl.Free; |
| 698 |
FileList.Free; |
if (datFileCheck) then begin |
| 699 |
|
FileList.Free; |
| 700 |
|
end; |
| 701 |
Board.Sorted := False; |
Board.Sorted := False; |
| 702 |
end; |
end; |
| 703 |
Board.IsThreadDatRead := True; |
Board.IsThreadDatRead := True; |
| 704 |
|
{$IFDEF DEBUG} |
| 705 |
|
rt := GetTickCount - st; |
| 706 |
|
Writeln('Read Done.' + IntToStr(rt) + ' ms'); |
| 707 |
|
{$ENDIF} |
| 708 |
end; |
end; |
| 709 |
{! |
{! |
| 710 |
\brief インデックスにないdat(はぐれdat)の追加 |
\brief インデックスにないdat(はぐれdat)の追加 |
| 3350 |
ThreadItem.NewReceive := ini.ReadInteger(SECTION, 'NewReceive', 0); |
ThreadItem.NewReceive := ini.ReadInteger(SECTION, 'NewReceive', 0); |
| 3351 |
|
|
| 3352 |
ThreadItem.Size := ini.ReadInteger(SECTION, 'Size', 0); |
ThreadItem.Size := ini.ReadInteger(SECTION, 'Size', 0); |
| 3353 |
if(ThreadItem.Size = 0) and (FileExists(ThreadItem.GetThreadFileName)) then begin |
ThreadItem.IsLogFile := FileExists(ThreadItem.GetThreadFileName); |
| 3354 |
|
if(ThreadItem.Size = 0) and (ThreadItem.IsLogFile) then begin |
| 3355 |
try |
try |
| 3356 |
ThreadItem.Size := GetFileSize(ThreadItem.GetThreadFileName) - ThreadItem.Count; |
ThreadItem.Size := GetFileSize(ThreadItem.GetThreadFileName) - ThreadItem.Count; |
| 3357 |
except |
except |