View Issue Details

IDProjectCategoryView StatusLast Update
0005923JEDI VCL00 JVCL Componentspublic2015-09-21 17:47
ReportertetarddAssigned ToAHUser 
PrioritynormalSeveritymajorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.45 
Target VersionFixed in Version3.49 
Summary0005923: TJvCustomURLGrabber can save a file of 0 size if internet connection not available.
DescriptionIf you don't have an internet connection, TJvCustomURLGrabber can still save a file/stream of size 0, which is not right as no internet connection means no file downloaded (compared to a genuine downloaded file that's empty).

Proposed fix:

TJvCustomURLGrabber = Class(...)
private
   ...
   FHasStartedGrabbing : Boolean;
   ...
End;


Constructor TJvCustomURLGrabber.Create(...);
Begin
    ...
    FHasStartedGrabbing := False;
End;

Procedure TJvCustomURLGrabber.DoEnded;
Begin
     // If the DoEnded is called and we did not start grabbing, do no handle
     // unexisting file/stream as empty ones!!!
     If Not FHasStartedGrabbing Then
          Exit;

     ...
End;

Procedure TJvCustomURLGrabberThread.SetGrabberStatus(Status : ...);
Begin
     ...
     If Status = gsGrabbing Then
          FGrabber.FhasStartedGrabbing := True;
End;
Additional InformationSorry, I can't give the full modified file, I have made extensive changes for my use and I just want to submit some key changes one by one for approval.
TagsNo tags attached.

Activities

obones

2013-01-15 15:09

administrator   ~0020340

Use the demo to reproduce

AHUser

2013-05-25 18:01

developer   ~0020518

Added in svn revision 13529.

Issue History

Date Modified Username Field Change
2012-06-28 15:09 tetardd New Issue
2013-01-15 15:09 obones Note Added: 0020340
2013-01-15 15:09 obones Status new => acknowledged
2013-05-25 18:01 AHUser Note Added: 0020518
2013-05-25 18:01 AHUser Status acknowledged => resolved
2013-05-25 18:01 AHUser Fixed in Version => Daily / SVN
2013-05-25 18:01 AHUser Resolution open => fixed
2013-05-25 18:01 AHUser Assigned To => AHUser
2015-09-21 17:47 obones Fixed in Version Daily / GIT => 3.49