Proposal: removeDirectoryRecursive should not follow symlinks

Malcolm Wallace malcolm.wallace at me.com
Tue Jan 6 16:14:29 UTC 2015


On 6 Jan 2015, at 14:59, Bardur Arantsson wrote:

> On 2015-01-06 14:57, Mike Meyer wrote:
>> On Tue, Jan 6, 2015 at 7:48 AM, Johan Tibell <johan.tibell at gmail.com> wrote:
>> 
>>> This is not a bugfix. A bug is failing to follow the functions
>>> specification, which *does* include following symlinks.
>>> 
>> 
>> It's a bug in the design, not the code. 

> Because *nobody* wants to follow symlinks when doing "rm -rf". Even if
> they think they do, they *really* don't.

I agree 100%.  Even time I use this function, I worry briefly about whether it follows symlinks, then think to myself "no, no-one would be so stupid to implement that deliberately in a publically available API".  So it was a real shock to discover in this thread that I was wrong, and furthermore that the function is documented as doing the wrong thing.  We should fix both spec and implementation, as soon as possible.

Regards,
    Malcolm


More information about the Libraries mailing list