Hello FPC-Pascal,

Thursday, March 31, 2011, 5:05:35 PM, you wrote:

>> Should I report this behaviour as a bug, or is it considered "by design"?
>> (My old Delphi does not support the CacheUpdates property, so I cannot
>> test how it behaves in Delphi)
mvwb> Please report it as a bug. Your fix proposal is good.

I think the fix is not good, eat an exception is not good at all, so I
think better:

destructor TIniFile.destroy;
begin
  try
    If FDirty and FCacheUpdates then
    begin
      UpdateFile;
    end;
  finally
    inherited destroy;
  end;
end;

Silently not updating the file seems to be a no-no.

-- 
Best regards,
 José

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to