Clean up legacy index files after migration

This commit is contained in:
thePR0M3TH3AN
2025-08-03 20:39:00 -04:00
parent 7fc098e8f2
commit 292b443158
2 changed files with 43 additions and 0 deletions

View File

@@ -67,6 +67,17 @@ class Vault:
legacy_checksum.rename(
self.fingerprint_dir / "seedpass_entries_db_checksum.txt"
)
# Remove any leftover legacy files to avoid triggering migration again
for stray in self.fingerprint_dir.glob("seedpass_passwords_db*.enc"):
try:
stray.unlink()
except FileNotFoundError:
pass
stray_checksum = self.fingerprint_dir / "seedpass_passwords_db_checksum.txt"
if stray_checksum.exists():
stray_checksum.unlink()
self.migrated_from_legacy = True
print(
colored(