From c31ffae440b6e5b3ef28d584cd2a8f8b0c471c4e Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 21 Nov 2007 13:37:45 +0000 Subject: [PATCH] FS#5690 - folders with a file named database.ignore will be skipped by the database when it rebuilds, (this includes any subdirs in that fodler) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15738 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.c | 10 ++++++++++ tools/buildzip.pl | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/tagcache.c b/apps/tagcache.c index 4ddf1d2d2d..91220a3517 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -3796,6 +3796,7 @@ static bool check_dir(const char *dirname) DIR *dir; int len; int success = false; + char newpath[MAX_PATH]; dir = opendir(dirname); if (!dir) @@ -3804,6 +3805,15 @@ static bool check_dir(const char *dirname) return false; } + /* check for a database.ignore file */ + snprintf(newpath, MAX_PATH, "%s/database.ignore", dirname); + len = open(newpath, O_RDONLY); + if (len >= 0) + { + close(len); + return false; + } + /* Recursively scan the dir. */ #ifdef __PCTOOL__ while (1) diff --git a/tools/buildzip.pl b/tools/buildzip.pl index e384eb8bd7..af87be07dc 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -186,7 +186,9 @@ sub buildzip { # always disable fonts on non-bitmap targets $fonts = 0; } - + # create the file so the database does not try indexing a folder + `touch .rockbox/database.ignore`; + if($fonts) { mkdir ".rockbox/fonts", 0777;