p2phttp: Scan multilevel directories with --directory
authorJoey Hess <joeyh@joeyh.name>
Mon, 7 Jul 2025 20:07:13 +0000 (16:07 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 7 Jul 2025 20:07:13 +0000 (16:07 -0400)
commit66b009a0f64233ea007af3c673b347b9b6a7ddfa
treec32242361c1662b2a9245c33bdda3c2dd9910954
parent0ad937f2305da8769ef7b8479a86d6d841485d70
p2phttp: Scan multilevel directories with --directory

This allows for eg dir/user/repo structure. But also other layouts. It
still does not look for repositories that are nested inside other
repositories.

The check for symlinks is mostly to avoid cycles that would prevent
findRepos from returning. Eg, foo/bar/baz being a symlink to foo/bar.

If the directory is writable by someone else they can still race it and
get it to follow a symlink to some other directory. I don't think p2phttp
needs to worry about that kind of situation though, and I doubt it avoids
such problems when operating on files in a git-annex repository either.
CHANGELOG
Command/P2PHttp.hs
doc/git-annex-p2phttp.mdwn