September 11 2017 File::Path Security Back

Why Was "Traditional" rmtree() Given Superpowers?

        CPAN.pm relies on rmtree to do a better job than 'rm -rf', i.e. definitely
        remove a complete tree without a hiccups.
        The current File::Path::rmtree has an undocumented feature that
        bothers me as it stands: on some systems (but not on UNIX) before
        removing a file or directory, permissions are changed to
        read/writeable.
        I'd prefer to have consistent semantics on all platforms. My patch
        treats the third parameter ($safe) in a way that matches the current
        description in the pods better. This means, on all systems a chmod +rw
        is tried before removing a file or directory unless the $safe
        parameter is specified.


Home Last TOC Copyright © 2017 James E Keenan Back Next