bug#70586: cp walks dir differently than rm and is hitting "File name too long" where this could be avoided

Collin Funk <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
Paul Eggert <[email protected]> writes:

> On 10/15/25 09:36, Collin Funk wrote:
>> I'll have a look at that one too. Finding a reasonable way to define the
>> sort functions in terms of 'FTSENT **' will not be very fun though.
>
> Should be easier for ls than for cp, as fts isn't really designed for
> destinations so you'll have to traverse the destination by hand.

Good to know, thanks.

> As you say, this is all reasonably low priority, as only buggy uses
> and attackers create file names longer than PATH_MAX (and rm is the
> cure for that...).

True, I don't think many, if any, have run into path length limitations
without explicitly trying to (*).

It still would be nice to fix though. We should be able to create
files/directories if the operating system supports it.

Collin

(*) In recent years at least. I am ignoring things like FAT32 filenames
which were limited to 11 characters or 255 with an extension.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.