MAJOR_VERSION = 1;
MINOR_VERSION = 0;
RELEASE_VERSION = 'beta';
- REVISION_VERSION = 24;
+ REVISION_VERSION = 25;
// =========================================================================
// \8eG\97p\8aÖ\90\94
// \8ew\92è\82µ\82½ URL \82Ì\83X\83\8c\83b\83h\82Ì\83_\83E\83\93\83\8d\81[\83h\82ð\8ew\8e¦\82³\82ê\82½
// *************************************************************************
function TMachiBBSThreadItem.Download : TDownloadState;
+const
+ RES_ERROR: String = '<ERROR>';
var
modified : Double;
tmp : PChar;
if responseCode = 200 then begin
// API\82Å\82Ídat\8c`\8e®\82Å\95Ô\82Á\82Ä\82\82é
content.Text := string( tmp );
- To2chDat2( content ); // \8c`\8e®\95Ï\8a·
+ if (content.Count > 0) and (Pos(RES_ERROR, content.Strings[0]) <> 1) then
+ To2chDat2( content ); // \8c`\8e®\95Ï\8a·
(* \8b\8c\8ed\97l\81iHTML\82Å\8eó\90M\82µdat\82É\95Ï\8a·\82·\82é\81j
downResult := TStringList.Create;
try
downAndParse;
if content.Count > 0 then begin
- if Count <= 0 then begin
- Result := dsComplete;
- // \90V\8bK\8f\91\82«\8d\9e\82Ý
- content[ 0 ] := content[ 0 ] + Title;
- logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
- try
- logStream.Position := logStream.Size;
- logStream.Write( PChar( content.Text )^, Length( content.Text ) );
- finally
- logStream.Free;
- end;
- NewReceive := 1;
- Count := content.Count;
- end else begin
- if (content.Count > 1) or (Trim(content.Text) <> '') then begin
- Result := dsDiffComplete;
- // \92Ç\8bL
- logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite );
+ if (Pos(RES_ERROR, content.Strings[0]) <> 1) then begin
+ if Count <= 0 then begin
+ Result := dsComplete;
+ // \90V\8bK\8f\91\82«\8d\9e\82Ý
+ content[ 0 ] := content[ 0 ] + Title;
+ logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
try
logStream.Position := logStream.Size;
logStream.Write( PChar( content.Text )^, Length( content.Text ) );
finally
logStream.Free;
end;
- NewReceive := Count + 1;
- Count := Count + content.Count;
+ NewReceive := 1;
+ Count := content.Count;
end else begin
- Result := dsNotModify;
+ if (content.Count > 1) or (Trim(content.Text) <> '') then begin
+ Result := dsDiffComplete;
+ // \92Ç\8bL
+ logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite );
+ try
+ logStream.Position := logStream.Size;
+ logStream.Write( PChar( content.Text )^, Length( content.Text ) );
+ finally
+ logStream.Free;
+ end;
+ NewReceive := Count + 1;
+ Count := Count + content.Count;
+ end else begin
+ Result := dsNotModify;
+ end;
+ end;
+ if (Result <> dsNotModify) then begin
+ // CGI \82©\82ç\82Í\90³\82µ\82¢\93ú\95t\82ª\93¾\82ç\82ê\82È\82¢\82Ì\82Å\8c»\8dÝ\82É\90Ý\92è
+ LastModified := Now;
+ NewResCount := content.Count;
end;
- end;
- if (Result <> dsNotModify) then begin
- // CGI \82©\82ç\82Í\90³\82µ\82¢\93ú\95t\82ª\93¾\82ç\82ê\82È\82¢\82Ì\82Å\8c»\8dÝ\82É\90Ý\92è
- LastModified := Now;
- NewResCount := content.Count;
end;
end else begin
Result := dsNotModify;