diff --git a/apps/tagcache.c b/apps/tagcache.c index ea7768139b..1babde2a02 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -430,7 +430,7 @@ static long find_entry_ram(const char *filename, } #endif -static long find_entry_disk(const char *filename, bool localfd) +static long find_entry_disk(const char *filename_raw, bool localfd) { struct tagcache_header tch; static long last_pos = -1; @@ -443,6 +443,13 @@ static long find_entry_disk(const char *filename, bool localfd) int i; int pos = -1; + char *filename = (char *)filename_raw; +#ifdef APPLICATION + char pathbuf[MAX_PATH]; + if (realpath(filename, pathbuf) == pathbuf) + filename = pathbuf; +#endif + if (!tc_stat.ready) return -2;