summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/tagcache.c12
-rw-r--r--apps/tagcache.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 7f12bab849..dea20393ff 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -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;
diff --git a/apps/tagcache.h b/apps/tagcache.h
index ea4d255630..281f3b86a2 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -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);