mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 13:45:10 -05:00
support open() properly so that the root dir works in the archos subdir
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@425 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bd16e2fa94
commit
91f165e3da
1 changed files with 13 additions and 0 deletions
|
|
@ -13,3 +13,16 @@ DIR *x11_opendir(char *name)
|
||||||
}
|
}
|
||||||
return opendir(name);
|
return opendir(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int x11_open(char *name, int opts)
|
||||||
|
{
|
||||||
|
char buffer[256]; /* sufficiently big */
|
||||||
|
|
||||||
|
if(name[0] == '/') {
|
||||||
|
sprintf(buffer, "%s/%s", SIMULATOR_ARCHOS_ROOT, name);
|
||||||
|
|
||||||
|
Logf("We open the real file '%s'", buffer);
|
||||||
|
return open(buffer, opts);
|
||||||
|
}
|
||||||
|
return open(name, opts);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue