Collin Funk <[email protected]> writes:
> It is known about, and has been mentioned in the TODO file for a very
> long time:
>
> cp --recursive: use fts and *at functions to perform directory
> traversals in source and destination hierarchy rather than forming
> full file names. The latter (current) approach fails unnecessarily
> when the names become very long, and requires space and time that is
> quadratic in the depth of the hierarchy.
>
> I suppose very few have run into the limit with real usage.
>
> I agree it should be fixed though. I'll have a look at it.
Also, 'ls -R' has the same problem.
$ mkdir -p `python3 -c 'print("./" + "a/" * 32768)'`
$ ls -R a > /dev/null
ls: cannot open directory '[long file name]': File name too long
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.
Collin