> Regarding issue #21855
>   http://bugs.freepascal.org/view.php?id=21855
> 
> I am planning to reject the patch but I would like to have other 
> opinions, too.

I'm in favor of patch with current definition (no default parameters as
suggested by Bart) and with following ammendment:

     if RemoveReadOnlyFiles and ((FileInfo.Attr and faReadOnly)>0) then
       if FileSetAttrUTF8(CurFilename, FileInfo.Attr-faReadOnly) <> 0 then
         exit;

Instead of 

     if RemoveReadOnlyFiles and ((FileInfo.Attr and faReadOnly)>0) then
       FileSetAttrUTF8(CurFilename, FileInfo.Attr-faReadOnly);

This way the function exits as soon as something goes wrong. No need
iterating in directories when the attribute of the directory itself can't be
changed.

Ludo


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to