lib.util.copy(): Require recursive for directories #169
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20261107-lib-util-copy-require-recursive-for-directories"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
lib.util.copy(): Require recursive for directories
copy()handed a non-recursive copy of a directory to the single-objectget()path. For a plain context the backend then fails with a transport error, and for a kvfile store the store root is a branch, not an entry, so theget()fails with a FileNotFoundError naming a transformed address: copyingkvfile:///etcreportedFileNotFoundError: etc.Require recursive for a directory source that is not fetchable as a whole, as cp requires -r for directories:
copy()now raises with a message naming the source and the recursive option, instead of falling through toget().Add a unit test that covers a directory source for a plain context and a kvfile store.