diff options
author | Thomas Jarosch <tomj@simonv.com> | 2011-02-16 01:01:49 +0000 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2011-02-16 01:01:49 +0000 |
commit | 0060fed4517766bfe175efdc668769175da5ac74 (patch) | |
tree | eedb2919d1ac98c963d2dc8b6246d41e434b448d | |
parent | 351c851d087b90d17ae97398f46a134b05bd2dfd (diff) | |
download | rockbox-0060fed4517766bfe175efdc668769175da5ac74.tar.gz 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
-rw-r--r-- | apps/tagcache.c | 9 |
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, | |||
430 | } | 430 | } |
431 | #endif | 431 | #endif |
432 | 432 | ||
433 | static long find_entry_disk(const char *filename, bool localfd) | 433 | static long find_entry_disk(const char *filename_raw, bool localfd) |
434 | { | 434 | { |
435 | struct tagcache_header tch; | 435 | struct tagcache_header tch; |
436 | static long last_pos = -1; | 436 | static long last_pos = -1; |
@@ -443,6 +443,13 @@ static long find_entry_disk(const char *filename, bool localfd) | |||
443 | int i; | 443 | int i; |
444 | int pos = -1; | 444 | int pos = -1; |
445 | 445 | ||
446 | char *filename = (char *)filename_raw; | ||
447 | #ifdef APPLICATION | ||
448 | char pathbuf[MAX_PATH]; | ||
449 | if (realpath(filename, pathbuf) == pathbuf) | ||
450 | filename = pathbuf; | ||
451 | #endif | ||
452 | |||
446 | if (!tc_stat.ready) | 453 | if (!tc_stat.ready) |
447 | return -2; | 454 | return -2; |
448 | 455 | ||