Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/ItemDownload.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.18 by yoffy, Fri Nov 28 01:16:49 2003 UTC revision 1.19 by h677, Fri Dec 5 10:19:26 2003 UTC
# Line 1137  var Line 1137  var
1137          ini: TMemIniFile;          ini: TMemIniFile;
1138          Res: TResRec;          Res: TResRec;
1139          NewRes: Integer;          NewRes: Integer;
1140        finish : Boolean;
1141        loopCnt : Integer;
1142  begin  begin
1143          FileName := ThreadItem.GetThreadFileName;          FileName := ThreadItem.GetThreadFileName;
1144    
# Line 1154  begin Line 1156  begin
1156          //                      if Body.Count > 0 then          //                      if Body.Count > 0 then
1157          //                              Body.Delete(0);          //                              Body.Delete(0);
1158          //                      Content := Body.Text;          //                      Content := Body.Text;
1159                                  Body.LoadFromFile(FileName);                  loopCnt := 10;
1160                                  OldCnt := Body.Count;                                  repeat
1161                                  Body.Text := Body.Text + Content;                      finish := true;
1162                                  Body.SaveToFile(FileName);                          try
1163                                  NewRes := Body.Count - OldCnt;                                                  Body.LoadFromFile(FileName);
1164                                  Cnt := Body.Count;                                                  OldCnt := Body.Count;
1165                                                    Body.Text := Body.Text + Content;
1166                                                    Body.SaveToFile(FileName);
1167                                                    NewRes := Body.Count - OldCnt;
1168                            except
1169                                    on E:EFOpenError do begin
1170                                sleep(10);
1171                                    finish := false;
1172                                Dec(loopCnt);
1173                            end;
1174                            end;
1175                    until finish and ( loopCnt > 0 );
1176                                    //Cnt := Body.Count;
1177                          end else begin                          end else begin
1178                                  Body.Text := Content;                                  Body.Text := Content;
1179          //                      if Body.Count > 0 then          //                      if Body.Count > 0 then
# Line 1176  begin Line 1190  begin
1190                                  ThreadItem.NewResCount := 0;                                  ThreadItem.NewResCount := 0;
1191                                  OldCnt := 0;                                  OldCnt := 0;
1192                                  NewRes := Body.Count;                                  NewRes := Body.Count;
1193                                  Cnt := Body.Count;                                  //Cnt := Body.Count;
1194                          end;                          end;
1195                          Cnt := Body.Count;                          Cnt := Body.Count;
1196                  finally                  finally
1197                          Body.Free;                          Body.Free;
1198                  end;                  end;
1199            
1200                  ThreadItem.Size := ThreadItem.Size + ContentLength;                  ThreadItem.Size := ThreadItem.Size + ContentLength;
1201                  ThreadItem.LastModified := LastModified;                  ThreadItem.LastModified := LastModified;
1202                  ThreadItem.Count := Cnt;                  ThreadItem.Count := Cnt;
1203                  ThreadItem.AllResCount := Cnt;                  //ThreadItem.AllResCount := Cnt;
1204                  ThreadItem.NewResCount := NewRes;                  ThreadItem.NewResCount := NewRes;
1205                  ThreadItem.NewReceive := OldCnt + 1;                  ThreadItem.NewReceive := OldCnt + 1;
1206          end;          end;
1207        ThreadItem.AllResCount := ThreadItem.Count;
1208          ThreadItem.IsLogFile := True;          ThreadItem.IsLogFile := True;
1209          ThreadItem.RoundDate := Now;          ThreadItem.RoundDate := Now;
1210          ThreadItem.UnRead := True;          ThreadItem.UnRead := True;
# Line 1212  begin Line 1227  begin
1227  //              ini.WriteInteger('Setting', 'RoundNo', ThreadItem.RoundNo);  //              ini.WriteInteger('Setting', 'RoundNo', ThreadItem.RoundNo);
1228                  ini.WriteBool('Setting', 'Round', ThreadItem.Round);                  ini.WriteBool('Setting', 'Round', ThreadItem.Round);
1229                  ini.WriteBool('Setting', 'UnRead', ThreadItem.UnRead);                  ini.WriteBool('Setting', 'UnRead', ThreadItem.UnRead);
1230                  ini.UpdateFile;          ini.UpdateFile;
1231          finally          finally
1232                  ini.Free;                  ini.Free;
1233          end;          end;

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26