From fcbe17d60b7bf71e32a288db18d95e7f0948c2db Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 7 Mar 2026 15:41:44 +0200 Subject: Add KeePass migration command with text/password and binary attachment support --- internal/store/store.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/store/store.go') diff --git a/internal/store/store.go b/internal/store/store.go index 527ece8..c91798f 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -149,6 +149,14 @@ func (s *Store) processIndexFile(ctx context.Context, path, searchTerm string, r return nil } +// LoadData decrypts and returns the .data payload for the given index entry. +func (s *Store) LoadData(ctx context.Context, idx *Index) (*Data, error) { + if idx == nil { + return nil, fmt.Errorf("loading data: nil index") + } + return loadData(ctx, filepath.Join(s.cfg.DataDir, idx.DataFile), s.cipher, s.git) +} + // Search collects all indexes matching searchTerm, sorts them by Description, // and applies the given action to each. For ActionCat the decrypted content is // printed; for ActionExport/ActionPathExport the content is written to ExportDir. -- cgit v1.2.3