anchor.diff:      AStream.Position := 0;
       FreeAndNil(FDocument);
       if ft in [HTMLType, TextType] then
  -      FDocument := TBuffer.Create(AStream, URL)
  +      FDocument := TBuffer.Create(AStream, FName)
       else
  -      FDocument := TBuffer.Create('<img src="' + URL + '">');
  +      FDocument := TBuffer.Create('<img src="' + FName + '">');
   
       if Assigned(FOnParseBegin) then
         FOnParseBegin(Self, FDocument);
   
  +    OldFile := FCurrentFile;
  +    FCurrentFile := ExpandFileName(FName);
       case ft of
         HTMLType:
         begin
  
positive.code: 
  procedure THtmlViewer.LoadStream(const URL: ThtString; AStream: TStream; ft: ThtmlFileType);
  var
    OldCursor: TCursor;
    SaveOnImageRequest: TGetImageEvent;
  begin
    if (vsProcessing in FViewerState) or not Assigned(AStream) then
      Exit;
    SetProcessing(True);
    OldCursor := Screen.Cursor;
    Screen.Cursor := crHourGlass;
    FRefreshDelay := 0;
    Include(FViewerState, vsDontDraw);
    try
      FSectionList.ProgressStart := 75;
      htProgressInit;
  
negative.code:     end
      else
      begin
        if I > 1 then
        begin
          Dest := System.Copy(S, I, Length(S) - I + 1); {local destination}
          S := System.Copy(S, 1, I - 1); {the file name}
  