directory: Remove empty hash directories when dropping content

Failure to remove is not treated as a problem, and no permissions
modifications are done, to avoid unexpected states.

Sponsored-by: Luke Shumaker on Patreon
This commit is contained in:
Joey Hess 2023-07-21 14:57:29 -04:00
parent 7f38355860
commit b15366494a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 37 additions and 5 deletions

View file

@ -112,3 +112,5 @@ drop sp_rsync a ok
I'm tinkering with annex for about 1 week, "doing research" in preparation to
use it as storage for backups.
> [[fixed|done]] --[[Joey]]

View file

@ -0,0 +1,16 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2023-07-21T18:08:52Z"
content="""
Hmm, I guess this wasn't implemented because a generally small number of
hash directories are not a bother. And because implementing it was a bit
annoying.
Testremote cannot test for this, because remotes do not need to have the
concept of a "directory". For example, a S3 bucket does not contain
directories, only filenames that may contain a "/" in them. Also, I don't
think it's necessarily a bug for a special remote to leave hash directories
in place when removing files. There could be good reasons to do that in
some cases.
"""]]