summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2011-02-16 01:01:49 +0000
committerThomas Jarosch <tomj@simonv.com>2011-02-16 01:01:49 +0000
commit0060fed4517766bfe175efdc668769175da5ac74 (patch)
treeeedb2919d1ac98c963d2dc8b6246d41e434b448d /apps
parent351c851d087b90d17ae97398f46a134b05bd2dfd (diff)
downloadrockbox-0060fed4517766bfe175efdc668769175da5ac74.tar.gz
rockbox-0060fed4517766bfe175efdc668769175da5ac74.tar.bz2
rockbox-0060fed4517766bfe175efdc668769175da5ac74.zip
RaaA: Fix tagcache filename lookups for paths containing symbolic links
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29317 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/tagcache.c9
1 files changed, 8 insertions, 1 deletions
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;