forked from len0rd/rockbox
Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c35b43b0f5
commit
2c2416094f
25 changed files with 311 additions and 288 deletions
|
@ -144,17 +144,15 @@ void *lc_open_from_mem(void *addr, size_t blob_size)
|
|||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
|
||||
/* we need that path fixed, since get_user_file_path()
|
||||
/* we need that path fixed, since _get_user_file_path()
|
||||
* gives us the folder on the sdcard where we cannot load libraries
|
||||
* from (no exec permissions)
|
||||
*/
|
||||
snprintf(temp_filename, sizeof(temp_filename),
|
||||
"/data/data/org.rockbox/app_rockbox/libtemp_binary_%d.so", i);
|
||||
#else
|
||||
char name[MAX_PATH];
|
||||
const char *_name = get_user_file_path(ROCKBOX_DIR, NEED_WRITE, name, sizeof(name));
|
||||
snprintf(temp_filename, sizeof(temp_filename),
|
||||
"%s/libtemp_binary_%d.dll", _name, i);
|
||||
ROCKBOX_DIR "/libtemp_binary_%d.dll", i);
|
||||
#endif
|
||||
fd = open(temp_filename, O_WRONLY|O_CREAT|O_TRUNC, 0700);
|
||||
if (fd >= 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue