This commit is contained in:
Joey Hess 2022-07-12 12:37:08 -04:00
parent 79712a8aeb
commit 51c43e8c95
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -0,0 +1,24 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2022-07-12T16:15:59Z"
content="""
How unfortunate that Android on your phone does not support `find -printf`.
What version of Android is that? I've tested a few and they do support it.
Reverting [[!commit a32ff6cef03ceb695af7bc6415ae7eaac06d3443]] would
certainly avoid this problem. But that commit did solve a bug in supporting
large numbers of files.
Android's find is (probably) from toybox, and looking at its changelog,
`find -printf` was added in May 2019, version 0.8.1. So versions of Android
before 2020 or so will probably have too old a version.
Maybe git-annex should have an option for older versions of android that
falls back to using `find -exec stat {} ;`. That would be a lot slower,
since it would run stat once per file, but it would work. Or it could
fall back to the old `find +` behavior that is limited to a certain number
of files. Or, it could consume the `find` output, segment it into groups of
files itself, and run `adb stat` on each group. Which would be somewhat
slower than using xargs, and potentially hard to get right.
"""]]