(tx *database.DB)
| 863 | } |
| 864 | |
| 865 | func 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 |
| 883 | func checkPostSyncIntegrity(db *database.DB) { |
no test coverage detected