Skip to content

rm doesn't really traverse directories like GNU rm at all, will fail on deeply-nested pathsΒ #2949

@untitaker

Description

@untitaker

GNU rm avoids constructing path strings of unbounded length to allow recursively deleting directories whose absolute paths exceed the max path length a Linux syscall can take. For more information please refer to this blogpost I wrote a while ago: https://unterwaditzer.net/2021/linux-paths.html

The rm in this repo appears to construct Path objects and therefore almost certainly will fail to remove the nested directories constructed in that article.

IIRC BSD rm works similarly to GNU rm here, and I would not be surprised if POSIX mandates a solution that works on really deeply nested filepaths.

There's probably more utilities in this repo which use Path objects, which immediately makes them fail in those edgecase situations where the equivalent GNU version might not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions