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
This commit is contained in:
parent
351c851d08
commit
0060fed451
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue