anchor.diff:        try
           DoSave;
           //prevent empty result file, issue #3435
  -        if bNotEmpty and (FileUtil.FileSize(AFileName)=0) then
  -          raise EWriteError.Create('Saved to the empty resulting file');
  +        if (Ed.Strings.Count>0) and (FileUtil.FileSize(AFileName)=0) then
  +          raise EFileNotFoundException.Create('Saved to an empty file');
         except
           on E: EConvertError do
             begin
  
positive.code: var
    OldEncoding: string;
    OldAttr: Longint;
    bNotEmpty: boolean;
  begin
    Result:= true;
    bNotEmpty:= Ed.Strings.Count>0;
    while true do
    try
      AppFileAttrPrepare(AFileName, OldAttr);
  
negative.code:       Ed.EndUpdate;
      end;
      AppFileAttrRestore(AFileName, OldAttr);
      exit;
    except
      if MsgBox(msgCannotSaveFile+#10+AFileName, MB_RETRYCANCEL or MB_ICONERROR) = IDCANCEL then
        exit(false);
    end;
  end;
  
  