Proposal: removeDirectoryRecursive should not follow symlinks

David Feuer david.feuer at gmail.com
Mon Jan 5 22:41:12 UTC 2015


This is much, much worse than -rf. GNU rm, at least, offers no way at
all to get the current behavior of removeDirectoryRecursive. I don't
think it's okay to leave it in the library by this name, and I'm a
moderate -1 on giving it a new name.

On Mon, Jan 5, 2015 at 5:33 PM, Greg Weber <greg at gregweber.info> wrote:
> How about being backwards-compatible friendly by adding a new function with
> the friendly behavior, adding a deprecation notice to the existing function,
> and putting the existing function under a new name that signifies the -rf?
> That would put me at a +1
>
> On Mon, Jan 5, 2015 at 2:31 PM, David Feuer <david.feuer at gmail.com> wrote:
>>
>> +1. Following symlinks in such a potentially-destructive operation is
>> fundamentally wrong.
>>
>> On Mon, Jan 5, 2015 at 5:25 PM, Edward Z. Yang <ezyang at mit.edu> wrote:
>> > Discussion period: one month
>> >
>> > I propose to backwards incompatibly change the behavior of
>> > removeDirectoryRecursive to not follow symlinks.  We could optionally
>> > add a replacement function under a new name which does follow symlinks.
>> >
>> > This would bring its behavior inline with rm -rf.
>> >
>> > I also opened a ticket here:
>> > https://ghc.haskell.org/trac/ghc/ticket/9266
>> >
>> > Thanks,
>> > Edward
>> > _______________________________________________
>> > Libraries mailing list
>> > Libraries at haskell.org
>> > http://www.haskell.org/mailman/listinfo/libraries
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
>
>


More information about the Libraries mailing list