[Lazarus] Removing read-only files in FileUtil.DeleteDirectory ?

Reinier Olislagers reinierolislagers at gmail.com
Sun Apr 29 14:02:58 CEST 2012


On 29-4-2012 13:58, Juha Manninen wrote:
> On Sun, Apr 29, 2012 at 2:39 PM, Reinier Olislagers
> <reinierolislagers at gmail.com <mailto:reinierolislagers at gmail.com>> wrote:
> 
>     On 29-4-2012 13:28, Juha Manninen wrote:
>     > 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.
> 
>     Actually, I'd like to have the possibility to delete an entire directory
>     with read only files without having to recursively remove the read only
>     attribute first.... just as long as it doesn't do so by default.
> 
>     Can e.g. be handy for backup programs removing old backup trees...
> I realize it would be useful sometimes.
> However on *nix systems you can't change a file's read-only status if
> you are not the file's owner.
> It may cause more problems than it solves them.
> Can it be solved in a clever way, I don't know.
Ok, but both on Windows and *nix, you can also have e.g. permissions
problems that prevent you from deleting a file.

If those permissions problems are handled the same way as problems
resetting read-only, shouldn't that be fine then?






More information about the Lazarus mailing list