passage icon indicating copy to clipboard operation
passage copied to clipboard

passage: avoid extra slash in recipients path

Open derat opened this issue 11 months ago • 1 comments

Make set_age_recipients() avoid embedding an extra slash in the recipients path when passed an empty directory, e.g. when reencrypting a file in the root of the store.

derat avatar Jan 16 '25 12:01 derat

I think that this is harmless, but it looked a bit odd.

Before (note paths in final two lines):

mail/test: reencrypting with: age -R /home/user/.passage/store/.age-recipients 
mail/other: reencrypting with: age -R /home/user/.passage/store/.age-recipients 
foo: reencrypting with: age -R /home/user/.passage/store//.age-recipients 
bar: reencrypting with: age -R /home/user/.passage/store//.age-recipients

After:

mail/test: reencrypting with: age -R /home/user/.passage/store/.age-recipients 
mail/other: reencrypting with: age -R /home/user/.passage/store/.age-recipients 
foo: reencrypting with: age -R /home/user/.passage/store/.age-recipients 
bar: reencrypting with: age -R /home/user/.passage/store/.age-recipients

derat avatar Jan 16 '25 12:01 derat