1
0
Fork 0
forked from len0rd/rockbox

Check if file has already been removed from DB when manually invoking

reverse scan.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11556 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2006-11-19 19:11:30 +00:00
parent d1077a8a0c
commit f752a5aa90
3 changed files with 14 additions and 0 deletions

View file

@ -3420,6 +3420,10 @@ static bool check_deleted_files(void)
return false;
}
/* Check if the file has already deleted from the db. */
if (*buf == '\0')
continue;
/* Now check if the file exists. */
testfd = open(buf, O_RDONLY);
if (testfd < 0)
@ -3859,6 +3863,14 @@ void tagcache_init(void)
#endif
}
#ifdef __PCTOOL__
void tagcache_reverse_scan(void)
{
logf("Checking for deleted files");
check_deleted_files();
}
#endif
bool tagcache_is_initialized(void)
{
return tc_stat.initialized;

View file

@ -138,6 +138,7 @@ struct tagcache_search {
#ifdef __PCTOOL__
void build_tagcache(const char *path);
void tagcache_reverse_scan(void);
#endif
int tagcache_str_to_tag(const char *str);

View file

@ -7,6 +7,7 @@ int main(int argc, char **argv)
{
tagcache_init();
build_tagcache("/export/stuff/mp3");
tagcache_reverse_scan();
return 0;
}