diff options
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r-- | apps/tagcache.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 6e416dd7f8..a6cfb4c590 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -4222,6 +4222,8 @@ static bool check_dir(const char *dirname, int add_files) | |||
4222 | success = true; | 4222 | success = true; |
4223 | break ; | 4223 | break ; |
4224 | } | 4224 | } |
4225 | |||
4226 | struct dirinfo info = dir_get_info(dir, entry); | ||
4225 | 4227 | ||
4226 | if (!strcmp((char *)entry->d_name, ".") || | 4228 | if (!strcmp((char *)entry->d_name, ".") || |
4227 | !strcmp((char *)entry->d_name, "..")) | 4229 | !strcmp((char *)entry->d_name, "..")) |
@@ -4234,14 +4236,14 @@ static bool check_dir(const char *dirname, int add_files) | |||
4234 | entry->d_name); | 4236 | entry->d_name); |
4235 | 4237 | ||
4236 | processed_dir_count++; | 4238 | processed_dir_count++; |
4237 | if (entry->attribute & ATTR_DIRECTORY) | 4239 | if (info.attribute & ATTR_DIRECTORY) |
4238 | check_dir(curpath, add_files); | 4240 | check_dir(curpath, add_files); |
4239 | else if (add_files) | 4241 | else if (add_files) |
4240 | { | 4242 | { |
4241 | tc_stat.curentry = curpath; | 4243 | tc_stat.curentry = curpath; |
4242 | 4244 | ||
4243 | /* Add a new entry to the temporary db file. */ | 4245 | /* Add a new entry to the temporary db file. */ |
4244 | add_tagcache(curpath, (entry->wrtdate << 16) | entry->wrttime | 4246 | add_tagcache(curpath, (info.wrtdate << 16) | info.wrttime |
4245 | #if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) | 4247 | #if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) |
4246 | , dir->internal_entry | 4248 | , dir->internal_entry |
4247 | #endif | 4249 | #endif |