From 68b740f64824ecbd1b215d28aea0d8f80da571ad Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Tue, 24 Oct 2006 17:39:06 +0000 Subject: [PATCH] Changelog importing was broken. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11325 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/tagcache.c b/apps/tagcache.c index ffafe5b8df..d8684bd989 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -2701,29 +2701,30 @@ static int parse_changelog_line(int line_n, const char *buf, void *parameters) if (*buf == '#') return 0; + logf("%d/%s", line_n, buf); if (!read_tag(tag_data, sizeof tag_data, buf, "filename")) { logf("filename missing"); logf("-> %s", buf); - return -1; + return 0; } idx_id = find_index(tag_data); if (idx_id < 0) { logf("entry not found"); - return -2; + return 0; } if (!get_index(masterfd, idx_id, &idx, false)) { logf("failed to retrieve index entry"); - return -3; + return 0; } /* Stop if tag has already been modified. */ if (idx.flag & FLAG_DIRTYNUM) - return -4; + return 0; logf("import: %s", tag_data); @@ -2782,7 +2783,7 @@ bool tagcache_import_changelog(void) filenametag_fd = open_tag_fd(&tch, tag_filename, false); - fast_readline(filenametag_fd, buf, sizeof buf, (long *)masterfd, + fast_readline(clfd, buf, sizeof buf, (long *)masterfd, parse_changelog_line); close(clfd);