Changelog importing was broken.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11325 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
02df5a8068
commit
68b740f648
1 changed files with 6 additions and 5 deletions
|
@ -2701,29 +2701,30 @@ static int parse_changelog_line(int line_n, const char *buf, void *parameters)
|
||||||
if (*buf == '#')
|
if (*buf == '#')
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
logf("%d/%s", line_n, buf);
|
||||||
if (!read_tag(tag_data, sizeof tag_data, buf, "filename"))
|
if (!read_tag(tag_data, sizeof tag_data, buf, "filename"))
|
||||||
{
|
{
|
||||||
logf("filename missing");
|
logf("filename missing");
|
||||||
logf("-> %s", buf);
|
logf("-> %s", buf);
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
idx_id = find_index(tag_data);
|
idx_id = find_index(tag_data);
|
||||||
if (idx_id < 0)
|
if (idx_id < 0)
|
||||||
{
|
{
|
||||||
logf("entry not found");
|
logf("entry not found");
|
||||||
return -2;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_index(masterfd, idx_id, &idx, false))
|
if (!get_index(masterfd, idx_id, &idx, false))
|
||||||
{
|
{
|
||||||
logf("failed to retrieve index entry");
|
logf("failed to retrieve index entry");
|
||||||
return -3;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stop if tag has already been modified. */
|
/* Stop if tag has already been modified. */
|
||||||
if (idx.flag & FLAG_DIRTYNUM)
|
if (idx.flag & FLAG_DIRTYNUM)
|
||||||
return -4;
|
return 0;
|
||||||
|
|
||||||
logf("import: %s", tag_data);
|
logf("import: %s", tag_data);
|
||||||
|
|
||||||
|
@ -2782,7 +2783,7 @@ bool tagcache_import_changelog(void)
|
||||||
|
|
||||||
filenametag_fd = open_tag_fd(&tch, tag_filename, false);
|
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);
|
parse_changelog_line);
|
||||||
|
|
||||||
close(clfd);
|
close(clfd);
|
||||||
|
|
Loading…
Reference in a new issue