MCPcopy Index your code
hub / github.com/dnote/dnote / warnOrphanedNotes

Function warnOrphanedNotes

pkg/cli/cmd/sync/sync.go:865–880  ·  view source on GitHub ↗
(tx *database.DB)

Source from the content-addressed store, hash-verified

863}
864
865func warnOrphanedNotes(tx *database.DB) {
866 count, orphans, err := findOrphanedNotes(tx)
867 if err != nil {
868 log.Debug("error checking orphaned notes: %v\n", err)
869 return
870 }
871
872 if count == 0 {
873 return
874 }
875
876 log.Debug("Found %d orphaned notes (book doesn't exist locally):\n", count)
877 for _, o := range orphans {
878 log.Debug("note %s (book %s)\n", o.noteUUID, o.bookUUID)
879 }
880}
881
882// checkPostSyncIntegrity checks for data integrity issues after sync and warns the user
883func checkPostSyncIntegrity(db *database.DB) {

Callers 1

sendNotesFunction · 0.85

Calls 2

DebugFunction · 0.92
findOrphanedNotesFunction · 0.85

Tested by

no test coverage detected