Fix NumSecrets() always returning 0 (closes #4) #9

Open
clawbot wants to merge 1 commits from clawbot/secret:fix/issue-4 into main

1 Commits

Author SHA1 Message Date
clawbot
341428d9ca fix: NumSecrets() now correctly counts secrets by checking for current file
NumSecrets() previously looked for non-directory, non-'current' files
directly under each secret directory, but the only children are
'current' (file, excluded) and 'versions' (directory, excluded),
so it always returned 0.

Now checks for the existence of the 'current' file, which is the
canonical indicator that a secret exists and has an active version.

This fixes the safety check in UnlockersRemove that was always
allowing removal of the last unlocker.
2026-02-08 12:04:15 -08:00