Compare commits
1 Commits
b89f688d70
...
1aaa382d5e
| Author | SHA1 | Date | |
|---|---|---|---|
|
1aaa382d5e
|
@@ -310,11 +310,9 @@ _verify_contact_dir(const char* cdir_path, GSList** issues)
|
||||
// identify which contact the problem belongs to (every contact has its
|
||||
// own history.log, so the bare filename is ambiguous).
|
||||
auto_gchar gchar* dir_name = g_path_get_basename(cdir_path);
|
||||
char* dir_unescaped = str_replace(dir_name, "_at_", "@");
|
||||
auto_gchar gchar* basename_owned = g_strdup_printf("%s/history.log",
|
||||
dir_unescaped ? dir_unescaped : dir_name);
|
||||
free(dir_unescaped);
|
||||
const char* basename = basename_owned;
|
||||
auto_gcharv gchar** parts = g_strsplit(dir_name, "_at_", -1);
|
||||
auto_gchar gchar* contact_jid = g_strjoinv("@", parts);
|
||||
auto_gchar gchar* basename = g_strdup_printf("%s/history.log", contact_jid);
|
||||
|
||||
_check_permissions(filepath, basename, issues);
|
||||
|
||||
|
||||
@@ -510,10 +510,10 @@ _sqlite_verify_integrity(const gchar* const contact_barejid)
|
||||
|
||||
integrity_issue_t* issue = g_malloc0(sizeof(integrity_issue_t));
|
||||
issue->level = INTEGRITY_WARNING;
|
||||
issue->file = g_strdup("chatlog.db");
|
||||
issue->file = g_strdup_printf("%s↔%s/chatlog.db",
|
||||
from_a ? from_a : "?", to_a ? to_a : "?");
|
||||
issue->line = id_a;
|
||||
issue->message = g_strdup_printf("Timestamp out of order in %s↔%s: row %d (%s) > row %d (%s)",
|
||||
from_a ? from_a : "?", to_a ? to_a : "?",
|
||||
issue->message = g_strdup_printf("Timestamp out of order: row %d (%s) > row %d (%s)",
|
||||
id_a, ts_a ? ts_a : "NULL",
|
||||
id_b, ts_b ? ts_b : "NULL");
|
||||
issues = g_slist_append(issues, issue);
|
||||
@@ -537,10 +537,10 @@ _sqlite_verify_integrity(const gchar* const contact_barejid)
|
||||
|
||||
integrity_issue_t* issue = g_malloc0(sizeof(integrity_issue_t));
|
||||
issue->level = INTEGRITY_ERROR;
|
||||
issue->file = g_strdup("chatlog.db");
|
||||
issue->file = g_strdup_printf("%s↔%s/chatlog.db",
|
||||
from ? from : "?", to ? to : "?");
|
||||
issue->line = id;
|
||||
issue->message = g_strdup_printf("Broken LMC reference in %s↔%s: row %d references non-existent row %d",
|
||||
from ? from : "?", to ? to : "?",
|
||||
issue->message = g_strdup_printf("Broken LMC reference: row %d references non-existent row %d",
|
||||
id, replaces_id);
|
||||
issues = g_slist_append(issues, issue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user